Do you know a good updated one? the one works with react hooks? I think SEO is very important to bussiness websites. Thank you.
1 Like
depends a bit how your frontend is built:
- react, react-router and apollo: then its pretty easy and more-or-less the same as in a non meteor-app. checkout some tutorials about react-router and SSR, there should be plenty Only difference is that you need to use meteor’s server-render package: https://docs.meteor.com/packages/server-render.html
- react and flow-router and meteor-collection: possible (we have one running app with that setu), but harder to find resources. First checkout the current flow-router: https://github.com/VeliovGroup/flow-router/ and the comments on my PR https://github.com/VeliovGroup/flow-router/pull/58 . Then you need to hydrate collections, which is possible with https://github.com/abecks/meteor-fast-render
2 Likes
Thank you. I’m using Meteor server-render package but it’s not complete solution. We need a way, a strategy to send data to clients, load data before running hydration…
Here are some interesting resources I found when I just some weeks ago posted the very same question here, see Example repo for state-of-the-art SSR in Meteor?
Boilerplates
- GitHub - timothyarmes/ta-meteor-apollo-starter-kit: Meteor 1.8, Apollo 2, React 16, Multilingual ready, PWA, Styled-Components boilerplate (referenced in this thread: Starter Kit with Meteor 1.8, Apollo 2, React 16, Multilingual support, PWA, SSR, Authentication & Styled-Components). This helped me a lot to see in practice how things work.
- GitHub - CaptainN/meteor-react-starter: A starter project on Meteor with React (another good boilerplate with lots of other stuff)
Articles
- Server-side rendering (SSR) in Meteor | by Julian Ćwirko | Meteor Blog
- https://www.chrisvisser.io/meteor/how-to-set-up-meteor-react-with-ssr
Good tutorial on the basics of SSR with React (not related to Meteor):
3 Likes