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
Steps to reproduce the behavior:
press the buttons in the sandbox
The animation seems to get run properly, but the rerender loop is unexpected.
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
react-spring v8.x.x or 9.x betareact v16.8Please try with the latest canary.
Note: You'll need to update your useTransition calls. See #809.
woo it works!
Thanks for responding so quickly & for maintaining a good library 馃憤
The new useTransition api looks amazing - really looking forward to react-spring 9.
I found this issue after some maddening debugging, trying to figure out why my expired items were not unmounted. Do you think a quick note in your docs warning of this might be useful? EDIT - argghhh I just realized my problem was 100% a consequence of running in concurrent mode. Play on the bleeding edge, get cut :). /EDIT
Also, no pressure of course, but can I ask when you hope to have the current canary released? Very eager to get my hands on it. Thanks for all the hard work - truly appreciated