Communitypackages:react-router-ssr v6 beta release

A fully working beta of communitypackages:react-router-ssr which is compatible with Meteor 3 has been published. This brings full server rendering in react to Meteor 3 with full data hydration and the ability to to server render components containing suspense boundaries.

A simple demo is available at https://github.com/copleykj/react-router-ssr-demo.

If you’re currently using this package, please upgrade and give it a test to help find any issues.

There’s still much to do such as React 19 compatibility. I’ll hold off on that till the next version though. If anyone wants to jump in and work on these kinds of updates, please do.

In the meantime if you appreciate this work and want to see it continue, you can sponsor it at https://github.com/sponsors/copleykj

6 Likes

Wow, that’s one awesome update.

1 Like

Thanks @minhna. Hoping to have a stable release in the next week or so. I’ll be putting it through its paces by upgrading a client app that’s been waiting to upgrade to Meteor 3 and has been blocked by the compatibility of this package.

1 Like

Seriously need to get to try this out, but I’m on React 19, so I’ll have to see how that will be possible or not.

I just tested this and it works really good using react 18. However using the latest react-meteor-data@3.0.5-beta.0 it doesn’t load the data. Can you have a look what’s the problem?

The community has made many improvements in react-meteor-data@3.0.5-beta.0, all backed by tests. Still, some scenarios might not behave as expected. Have you checked if it works with the previous stable version?

If it does, we should isolate your use case in the beta version so we can reproduce it in conjuntion with react-router-ssr in a test and include a fix with other updates in react-meteor-data. Could you provide more reproduction steps for them to fix? Or maybe the issue is on react-router-ssr side, we should verify.

A recent change was also merged and will be part of the next beta: perf(suspense): optimize handling of multiple suspense/useSubscribe by welkinwong · Pull Request #441 · meteor/react-packages · GitHub

1 Like

It’s working with the current react-meteor-data stable version 3.0.3.
It can be replicated with copleykj’s react-router-ssr-demo. With the current stable react-meteor-data it loads all the links on the main page, with the new beta there are no links showing.

Are you using the useSubscribeSuspense hook provided by communitypackages:react-router-ssr?

Hi. Yes the useSubscribeSuspense is used here in the Info component:

Try updating to the latest react-meteor-data with this command and you can replicate it as well:

meteor add react-meteor-data@4.0.0-beta.0