Do you know a good updated one? the one works with react hooks? I think SEO is very important to bussiness websites. Thank you.
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
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?
- https://github.com/timothyarmes/ta-meteor-apollo-starter-kit (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.
- https://github.com/CaptainN/meteor-react-starter (another good boilerplate with lots of other stuff)
Good tutorial on the basics of SSR with React (not related to Meteor):