Skip to content

New RFC: Mechanism to substitute the react build.#145

Open
Gaelan wants to merge 1 commit intoreactjs:mainfrom
Gaelan:patch-1
Open

New RFC: Mechanism to substitute the react build.#145
Gaelan wants to merge 1 commit intoreactjs:mainfrom
Gaelan:patch-1

Conversation

@Gaelan
Copy link
Copy Markdown

@Gaelan Gaelan commented Feb 12, 2020

This is fairly borderline in terms of whether it needs to be an RFC—if this is better suited for the primary react repo, I'm happy to move it over there.

@facebook-github-bot
Copy link
Copy Markdown
Collaborator

Hi @Gaelan!

Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Copy Markdown
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

with a development build of React," debugging some of these issues could
be substanially easier.

The specific issue that inspired my to file this RFC was an issue with
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specific issue that inspired my to file this RFC was an issue with
Gatsby SSR: Gatsby only uses SSR in production, and we had a bug that
caused SSR to generate a slightly different component tree than the
client, causing a hard-to-track-down issue with hydration.

That sounds like an important issue for Gatsby to solve. We assume that people using SSR develop with it enabled too. Is there an issue I can read about this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the relevant Gatsby issue: gatsbyjs/gatsby#17914

@gaearon
Copy link
Copy Markdown
Member

gaearon commented Feb 12, 2020

I think maybe @sophiebits suggested something similar at some point.

@sophiebits
Copy link
Copy Markdown
Member

Yes. Still think it’s a good idea.

@gaearon
Copy link
Copy Markdown
Member

gaearon commented Aug 18, 2021

Tbh this seems more oriented towards GH repo with a proof of concept.

@gaearon
Copy link
Copy Markdown
Member

gaearon commented Aug 18, 2021

I think the really annoying part here is that the versions need to match, and that's a bit tricky. I guess DevTools could try to download a matching version from npm. Then there's a question of: do we also replace react (or react-dom only), what about scheduler, what to do when they get optimized/inlined by the bundler, and so on. I think an RFC for this would need to go into a lot more detail about how the hard parts are solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants