Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document switch to only support experimental React release channel #34

Open
3 tasks
Ephem opened this issue Oct 26, 2019 · 2 comments
Open
3 tasks

Document switch to only support experimental React release channel #34

Ephem opened this issue Oct 26, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Ephem
Copy link
Owner

Ephem commented Oct 26, 2019

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 Ephem changed the title Hydration broken with React v16.11.0 Document switch to only support experimental React release channel Dec 1, 2019
@Ephem Ephem added the help wanted Extra attention is needed label Dec 1, 2019
@Ephem
Copy link
Owner Author

Ephem commented Dec 1, 2019

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
Copy link
Owner Author

Ephem commented Feb 26, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant