I've created a react redux project, now how do I add some SEO functionalities to project? I do not want to waste much time while refactoring codes.
Asked
Active
Viewed 48 times
1
1 Answers
1
- You need to setup the redux store on the server and pass its initial state down to the client, so that the server-render and initial client render don't differ
- Not all life cycle functions are called on the serverside, mainly
componentDidMount
is not called. This indeed helps if you want to do some AJAX data fetching (which you only want to do on the client). - If you are using
react-router
you need to setup the serverside route matching
Here are some more details: React can be used on server side rendering. What does that mean?