Document switch to only support experimental React release channel
As was explained in #32, hydration of <Suspense> in React is supposed to only work with blocking or concurrent roots, not with the "legacy" ReactDOM.render. That this has worked up until now has been unintentional and the v16.11.0 release broke this for good.
The plan moving forward is mainly to write docs to explain this better. Lightyear will move to "only" be compatible with the experimental React release-channel, which matches well with the experimental nature of Lightyear. I am not sure yet how this will affect versioning of Lightyear, or how peerDependencies will work with React, since the experimental release channel does not follow semver, feedback on this is very welcome!
A known workaround to get Lightyear to work with the "legacy" rendering mode is to have a <CustomSuspense>-component that renders a <Suspense> boundary on the server, a <Fragment> on the client which gets switched back to <Suspense> in an effect. This probably has a bunch of bad implications though. There might be other workarounds as well, I am not sure yet if I will document any of these or not.
- [ ] Figure out and decide on good strategy for versioning
- [ ] Update Readme for experimental release channel, that is, blocking/concurrent mode
- [ ] Update examples to concurrent mode and experimental release channel
I wanted to post an update on this. While this is a pretty small task, a lot has been going on at work and on the personal plane I'm in the middle of a move, so I probably won't have time to get into this before the holidays.
Lightyear should be working perfectly fine with the experimental React release channel so this issue is mainly about updating docs and examples, feel free to help out if that looks interesting! 😄
I'm leaning towards mirroring the React experimental release channel for versioning. That is:
- No more releases to
latest - New
experimentalrelease-channel where future releases will happen (akareact-lightyear@experimental) - Versions will be the same as the experimental React versions, for example
0.0.0-experimental-8d7535e54, thus abandoning semver entirely - If
react-lightyearneeds to release an extra version, a nr will be appended at the end, for example0.0.0-experimental-8d7535e54-2, but considering how often releases happen to the experimental React-channel this might not ever be needed
I'm aiming to implement this with a new release which syncs to the latest React experimental release.
#35 tracks that merge, a follow up will do the additional work of updating docs, examples and the release-script. This will happen soon.