Skip to content

Conversation

@i-am-the-slime
Copy link
Member

@i-am-the-slime i-am-the-slime commented Feb 1, 2026

This PR adds bindings for the new React 19 hooks: useOptimistic, useActionState, and useEffectEvent.

useOptimistic lets you show optimistic updates whilst an async action is running, and automatically reverts when the action completes. useActionState is useful for managing form submissions with built-in pending states. useEffectEvent extracts non-reactive logic from effects so you can access the latest props/state without causing the effect to re-run.

I've also added Aff variants of useActionState (useAffActionState) to match the library's existing pattern with useAff and useAffReducer. Both the regular and Aff versions support an optional permalink parameter for progressive enhancement.

This bumps React to 19.0.0 and updates the testing library accordingly. All existing tests still pass.

@i-am-the-slime i-am-the-slime merged commit 7988118 into main Feb 1, 2026
1 check passed
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