Repository navigation
v5.3.0-next.2
Pre-release
Pre-release
·
85 commits
to main
since this release
Release Description for v5.3.0-next.2
Bug Fixes
- Fixed view prop initial values: Elements with
opacity: 0(or other initial values) in the style prop now correctly apply those values immediately on mount, preventing a flash of incorrect styles before animations start. This ensures elements are invisible when they should be, even before the view animation triggers. - Fixed Jest fake timers warnings: Resolved all fake timers warnings in test suite by properly configuring timer setup and replacing
waitForcalls with direct assertions for better compatibility with fake timers.
Improvements
- Optimized transform rendering: Extracted duplicate transform rendering logic into a reusable
createTransformRendererhelper function, reducing code duplication and improving maintainability acrossstateAnimations.tsandAnimatedComponent.tsx. - Enhanced view prop initialization: Added
useLayoutEffecthook to ensure initial values from style props are applied synchronously before the first paint, providing a smoother user experience.
Examples
- Added view prop with delay example: New example demonstrating the
viewprop withwithDelayandwithTimingdescriptors, showing how elements can fade in after a delay when entering the viewport.
Technical Details
- Improved initial value handling in
useViewAnimationshook - Better subscription management for view animations
- Cleaner code organization with shared transform rendering utilities
This release focuses on fixing the view prop behavior and improving code quality through optimizations and test fixes.