In the React on Rails README it says,
In most cases, you should use the
prerender: false
(default behavior) with the provided helper method to render the React component from your Rails views. In some cases, such as when SEO is vital, or many users will not have JavaScript enabled, you can enable server-rendering by passingprerender: true
to your helper, or you can simply change the default inconfig/initializers/react_on_rails
.
I’m curious why you should use prerender: false
in most cases? From my point of view it gives the user a better experience as there’s no need to wait for JS to kick in and render the component and the already mentioned SEO aspect. Am I missing anything?