Skip to content

feat(fuselage-hooks): Deprecate useEffectEvent in favor of useStableCallback#1868

Merged
tassoevan merged 3 commits intomainfrom
feat/use-stable-callback
Feb 26, 2026
Merged

feat(fuselage-hooks): Deprecate useEffectEvent in favor of useStableCallback#1868
tassoevan merged 3 commits intomainfrom
feat/use-stable-callback

Conversation

@tassoevan
Copy link
Collaborator

Proposed changes (including videos or screenshots)

The useEffectEvent hook has been renamed to useStableCallback to better reflect its purpose and behavior. The new
name emphasizes that the hook provides a stable callback function that maintains a consistent identity across renders
while always having access to the latest values of props and state. It differs from useEffectEvent from React 19,
which returns functions that can only be called from inside effects and other effect events.

@tassoevan tassoevan requested a review from a team February 25, 2026 23:20
@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: 5574f40

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

This PR includes changesets to release 4 packages
Name Type
@rocket.chat/fuselage-hooks Minor
@rocket.chat/fuselage Patch
@rocket.chat/fuselage-forms Major
@rocket.chat/logo 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

@tassoevan tassoevan force-pushed the feat/use-stable-callback branch from 2c928da to 5574f40 Compare February 25, 2026 23:24
Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

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

Image

@tassoevan tassoevan merged commit 84d8d59 into main Feb 26, 2026
5 checks passed
@tassoevan tassoevan deleted the feat/use-stable-callback branch February 26, 2026 13:00
@github-actions github-actions bot mentioned this pull request Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants