sghall / resonance

:black_medium_small_square:Resonance | 5kb React animation library
https://sghall.github.io/resonance
MIT License
1k stars 27 forks source link

Make lazy removal of nodes configurable #16

Closed sghall closed 7 years ago

sghall commented 7 years ago

Calling removeNode does not immediately remove the node from document. It remains until the next update (if any). This avoids thrashing the DOM, but it's not ideal in all situations. It should be configurable.

sghall commented 7 years ago

Done in 0.5.0. Components now receive remove and lazyRemove functions. Calling remove() will update the state immediately. Calling lazyRemove() will register the key for removal on the next update.