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): useProperty didn't subscribed in Strict mode #31

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

Fyzu
Copy link
Collaborator

@Fyzu Fyzu commented Jan 14, 2022

When we use React.Strict mode, all pure effects useMemo \ useCallback etc calls two times.

This breaks useProperty hook.

@nx-cloud
Copy link

nx-cloud bot commented Jan 14, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 155c158. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 3 targets

Sent with 💌 from NxCloud.

@raveclassic
Copy link
Owner

raveclassic commented Jan 14, 2022

Let's add some tests here. Is it possible to render React.Strict in test?

@Fyzu Fyzu force-pushed the fix/react-use-property branch from 928ebd4 to 155c158 Compare January 16, 2022 13:58
@Fyzu Fyzu requested a review from raveclassic January 16, 2022 13:59
@Fyzu
Copy link
Collaborator Author

Fyzu commented Jan 16, 2022

Tests added.

@raveclassic raveclassic merged commit 9898edc into raveclassic:master Jan 17, 2022
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.

2 participants