You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Activity and ViewTransition components for React 19.2+
Adds two new React 19.2+ experimental components with full PureScript
bindings and comprehensive test coverage.
New modules:
- React.Basic.Hooks.Activity - Hide/show UI while preserving state
- React.Basic.Hooks.ViewTransition - Animated transitions with View
Transition API
Features:
- Complete FFI bindings to React.Activity and React.ViewTransition
- Type-safe APIs with ActivityMode and AnimationValue types
- Support for all props including callbacks and shared element transitions
- Comprehensive test suites (pending until React 19.2+ is available)
- Full documentation with examples in README
Dependencies:
- Added foreign-object and web-dom to main dependencies
- Tests marked as pending (require React 19.2+ experimental/canary)
Note: These components are only available in React 19.2+ experimental
releases, not in stable React 19.0.x
-- onSuccess can use the latest count without re-running the effect
130
130
onSuccessEvent <- useEffectEvent \data -> do
131
131
onSuccess data count
132
-
132
+
133
133
-- Effect only re-runs when url changes, not when count changes
134
134
useEffect url do
135
135
response <- fetchData url
136
136
onSuccessEvent response
137
137
pure mempty
138
-
138
+
139
139
pure $ R.div_ [ ... ]
140
140
```
141
141
142
+
## React 19 Components
143
+
144
+
**Note:** These components require React 19.2+ experimental/canary versions. They are not available in stable React 19.0.x releases.
145
+
146
+
### Activity
147
+
148
+
The `Activity` component lets you hide and restore the UI and internal state of its children while preserving their state and DOM. Available in `React.Basic.Hooks.Activity`.
0 commit comments