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

[v9] fix: forward StrictMode #2547

Merged
merged 6 commits into from
Feb 27, 2023
Merged

[v9] fix: forward StrictMode #2547

merged 6 commits into from
Feb 27, 2023

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented Oct 2, 2022

Respects React.StrictMode from parent renderers in R3F's Canvas. Targeting v9 since this highlights a lot of bugs in surrounding libraries that we'll want to take care of. This should probably be implemented downstream in a major.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a0f23d3:

Sandbox Source
example Configuration

@CodyJasonBennett CodyJasonBennett mentioned this pull request Oct 2, 2022
18 tasks
@CodyJasonBennett CodyJasonBennett marked this pull request as draft October 3, 2022 08:38
@krispya
Copy link
Member

krispya commented Feb 25, 2023

How do you feel about merging this? Seems like a good feature for us.

@CodyJasonBennett
Copy link
Member Author

We have to add this for sure, but wondering whether we should let people opt in/out between v8 and v9.

@krispya
Copy link
Member

krispya commented Feb 27, 2023

As in a prop on Canvas? I would expect opting out means removing React.StrictMode.

@CodyJasonBennett
Copy link
Member Author

CodyJasonBennett commented Feb 27, 2023

Fair enough. I was moreso concerned about whether to backport as an opt-in flag to v8, but I'll leave it be since we'd just remove it in v9.

@krispya
Copy link
Member

krispya commented Feb 27, 2023

Yeah and I think very few people would actually opt-in. It's one of those changes that is technically correct but certainly going to introduce users insulated from React's disruptive change a year later.

@CodyJasonBennett CodyJasonBennett marked this pull request as ready for review February 27, 2023 22:53
@CodyJasonBennett CodyJasonBennett merged commit c25f990 into v9 Feb 27, 2023
@CodyJasonBennett CodyJasonBennett deleted the fix/forward-strictmode branch February 27, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants