this image shows multiple apps that should run when I click on them individually.Like: if i click Filter then it should run Filter.js .
-
You can create a component for each individual App, then create a parent app which loads the other subApps (which are nothing more than components). Also, from inside a .jsx you can import .js libraries and run them from your component's life-cycle methods (e.g. construct or componentDidMount). I'm not sure this addresses your question. Can you be more specific and provide what you have tried so far?David Neto– David Neto2017-01-25 16:19:23 +00:00Commented Jan 25, 2017 at 16:19
-
I made a parent app and loaded all the components in that...but what i want is , when i click the above displayed tiles it should open respective app in browser...eg. when we open a wallpaper site we get multiple wallpapers displayed on it and on clicking every single of them opens respective image in browser..Gaurav Soni– Gaurav Soni2017-01-25 16:25:13 +00:00Commented Jan 25, 2017 at 16:25
Add a comment
|
1 Answer
You should try react-router: https://github.com/ReactTraining/react-router
If I well understood, you're trying to split your app into sections and react-routing is great to do so. You also get path/link matching to your route as a bonus.
It comes with a nice tutorial https://github.com/reactjs/react-router-tutorial which shouldn't take long to go through. For your case, you should need just the first 3 steps.
Good luck.