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: primitive children mounting #3248

Merged
merged 6 commits into from May 3, 2024
Merged

Conversation

krispya
Copy link
Member

@krispya krispya commented May 3, 2024

Fixes #3204
Fixes #3125
Fixes #3143

  • Regenerates the R3F instance for primitives when createInstance is called to simulate creating a new object. The object is untouched.
  • Add tests as outlined in the issue.

Copy link

codesandbox-ci bot commented May 3, 2024

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 0e5c94c:

Sandbox Source
example Configuration

@CodyJasonBennett CodyJasonBennett changed the title fix: primitive children mounting [v9] fix: primitive children mounting May 3, 2024
@krispya
Copy link
Member Author

krispya commented May 3, 2024

Primitive instances were being flushed during updates when switchInstance was called causing the unstable key test to fail. This simply opts out of flushing during switchInstance.

@krispya
Copy link
Member Author

krispya commented May 3, 2024

Comment on lines +322 to +325
// Update attach props for primitives since we don't flush them
if (type === 'primitive') {
newInstance.props.attach = props.attach
}
Copy link
Member

Choose a reason for hiding this comment

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

Probably an issue with applyProps not being called for primitives in prepare or the reference being broken somewhere.

@CodyJasonBennett CodyJasonBennett merged commit 1183029 into v9 May 3, 2024
2 checks passed
@CodyJasonBennett CodyJasonBennett deleted the fix/primitive-children branch May 3, 2024 18:09
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