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

Fix React warning with useGeometry deps array #1687

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Jul 31, 2024

Introducing a breaking change in the signature of the useGeometry hook to fix #1684

The problem came from passing false or undefined as the value of the params parameter in order to skip updating the geometry (e.g. when the R3F object is hidden). I change the signature of the hook to decouple this feature from the params parameter: the hook now accepts a config object as fourth argument (which also makes the isInteractive boolean more explicit).

Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

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

Sorry, looked at this but forgot to approve

@axelboc axelboc merged commit f797882 into main Aug 2, 2024
8 checks passed
@axelboc axelboc deleted the fix-usegeometry-warning branch August 2, 2024 08:25
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.

DataCurve curveType change throws a warning in React's Strict Mode
2 participants