react-lightyear icon indicating copy to clipboard operation
react-lightyear copied to clipboard

Document switch to only support experimental React release channel

Open Ephem opened this issue 6 years ago • 2 comments

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

Ephem avatar Oct 26 '19 13:10 Ephem

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! 😄

Ephem avatar Dec 01 '19 18:12 Ephem

I'm leaning towards mirroring the React experimental release channel for versioning. That is:

  • No more releases to latest
  • New experimental release-channel where future releases will happen (aka react-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-lightyear needs to release an extra version, a nr will be appended at the end, for example 0.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.

Ephem avatar Feb 26 '20 14:02 Ephem