Reputation: 17393
I should use node.js
. I would like to use reactjs
to render my views. but there are some questions.
reactjs
like componentDidMount
will work?redux
, is it possible?react
or express.js
router)?Upvotes: 0
Views: 103
Reputation: 1704
Eg: myapp.com/reactapp -> done by Express, where index.html is on /reactapp myapp.com/myapp/new/view --> here /new/view is routed by react
Upvotes: 0
Reputation: 15698
1) Predefined functions like componentDidMount will totally work as well as the other lifecycle events in React.
2) Yes, it's possible, Redux is great for app-state management and preserving data to be used inside the application for each instance.
3) You should make use of both React-Router and Express. You can use React-Router to navigate on the front-end, navigating from page to page. For Express, it's especially useful for developing API routes for your backend if necessary.
Upvotes: 1