Skip to content

v5.3.0-next.2

Pre-release
Pre-release

Choose a tag to compare

@dipeshrai123 dipeshrai123 released this 27 Dec 05:29
· 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 waitFor calls with direct assertions for better compatibility with fake timers.

Improvements

  • Optimized transform rendering: Extracted duplicate transform rendering logic into a reusable createTransformRenderer helper function, reducing code duplication and improving maintainability across stateAnimations.ts and AnimatedComponent.tsx.
  • Enhanced view prop initialization: Added useLayoutEffect hook 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 view prop with withDelay and withTiming descriptors, showing how elements can fade in after a delay when entering the viewport.

Technical Details

  • Improved initial value handling in useViewAnimations hook
  • 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.