fix: Fall back to layout position when item position is unset
Fixes grid/flex items not appearing until the first scroll on Reanimated 4.4 (#552).
When absolute layout becomes active, an item's animated position may not be propagated yet, so it would render with HIDDEN_STYLE and stay hidden until a scroll re-ran the layout. This falls back to the item's layoutPosition (from itemPositions) while position is still null, so items render at their correct slots immediately. position stays primary (drag/reorder animations unaffected), and HIDDEN_STYLE is kept only as the both-null fallback.
Closes #552
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| react-native-sortables-docs | Preview, Comment | Jun 10, 2026 2:14pm |
Closing without merging - the layout-position fallback fix is no longer necessary as reanimated 4.5.0 fixed the issue.
Closing without merging — the layout-position fallback fix is no longer necessary.
Hey @MatiPl01, I just applied this patch yesterday. What's the reason this is no longer necessary? Is it because of changes made in Reanimated 4.5?
Closing without merging — the layout-position fallback fix is no longer necessary.
Hey @MatiPl01, I just applied this patch yesterday. What's the reason this is no longer necessary? Is it because of changes made in Reanimated 4.5?
Yes, exactly. We will backport it to 4.4.2 soon.