-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
kind: bugSomething isn't workingSomething isn't working
Description
🐛 Bug Report
Each re-render useTransition is passed an array from state. This works fine when adding objects, but when objects are removed from the array it triggers a rerender loop.
possibly related: #636
To Reproduce
Steps to reproduce the behavior:
press the buttons in the sandbox
Expected behavior
The animation seems to get run properly, but the rerender loop is unexpected.
Link to repro (highly encouraged)
bug with useState hook: https://codesandbox.io/s/usetransition-bug-state-v49uq
bug with useReducer hook (slightly more complex): https://codesandbox.io/s/usetransition-bug-25xbr
Environment
react-springv8.x.x or 9.x betareactv16.8
Metadata
Metadata
Assignees
Labels
kind: bugSomething isn't workingSomething isn't working