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

πŸ—‘οΈ Deprecated useEffectOnce, useIsFirstRender and useUpdateEffect #477

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

juliencrn
Copy link
Owner

These hooks are deprecated and will be dropped in a future major release. While they may seem convenient, their behavior can be misleading or can encourage bad practices (component lifecycle mindset). Instead, opt for useEffect for synchronization, as React 18 emphasizes its importance by rendering components twice in strict mode to highlight improper usage. Prefer using React's API directly.

Fixes: #389

Copy link

changeset-bot bot commented Feb 8, 2024

πŸ¦‹ Changeset detected

Latest commit: 62c306b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
usehooks-ts Patch
www Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@juliencrn juliencrn merged commit bc3f967 into master Feb 8, 2024
3 checks passed
@juliencrn juliencrn mentioned this pull request Feb 9, 2024
@juliencrn juliencrn deleted the chore/deprecated-bad-effect-hooks branch February 27, 2024 18:41
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.

bug: useIsFirstRender broken with NextJs App router
1 participant