Kemal Y
Kemal Y

Reputation: 59

How to add universal support existing react project

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.

Upvotes: 1

Views: 49

Answers (1)

Scarysize
Scarysize

Reputation: 4281

  • 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?

Upvotes: 1

Related Questions