Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server side rendering #2

Closed
benbonnet opened this issue Apr 18, 2015 · 2 comments
Closed

Server side rendering #2

benbonnet opened this issue Apr 18, 2015 · 2 comments

Comments

@benbonnet
Copy link

Is the server-side rendering actually working with your tool ?
I'm expecting so far to still have react_component('HelloMessage', {name: 'John'}, {prerender: true}) provided by react-rails

I've so far set things correctly, but from your readme, I might not get everything
I obviously dont know how to "require" the router when prerendering

Thanks for your hints (:

@i8ramin
Copy link

i8ramin commented May 7, 2015

+1 ... I am guessing server side rendering doesn't currently work with this gem.

@mariopeixoto
Copy link
Owner

@bbnnt and @i8ramin Sorry for the delay, somehow I wasn't getting notification emails from this repo.

Please take a look at the new version of the gem - 0.13.3.

Use the react_router helper like this and you will get your component pre-rendered on the server.
<%= react_router 'MyRoutes', 'HistoryLocation', {}, { prerender_location: path_to_route } %>

I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants