How do you use React.js for SEO?

前端 未结 6 1233
星月不相逢
星月不相逢 2021-01-30 01:34

Articles on React.js like to point out, that React.js is great for SEO purposes. Unfortunately, I\'ve never read, how you actually do it. Do you simply implement _escaped_

6条回答
  •  别那么骄傲
    2021-01-30 02:24

    As the other responder said, what you are looking for is an Isomorphic approach. This allows the page to come from the server with the rendered content that will be parsed by search engines. As another commenter mentioned, this might make it seem like you are stuck using node.js as your server-side language. While it is true that have javascript run on the server is needed to make this work, you do not have to do everything in node. For example, this article discusses how to achieve an isomorphic page using Scala and react:

    Isomorphic Web Design with React and Scala

    That article also outlines the UX and SEO benefits of this sort of isomorphic approach.

提交回复
热议问题