Removing Elements/Nodes Asynchronously(?)
See original GitHub issueHereās a fiddle to illustrate my use case: https://jsfiddle.net/dylanrw/mcg324a4/
Typically there isnāt a problem, if state changes, I want the irrelevant elements removed. But when it comes to animating elements before removal, it would be nice if I could begin a transition and have the removal/sorting process occur once that transition is completed, or do something to have the soon-to-be-removed element stay in place until the transition is complete (even if the other elements update). (As you see in the fiddle, if you click an element, the elements are sorted, and then the element clicked is removed at the bottom.)
I tried one experiment at @jbucaranās encouragement where I added a lifecycle event onreorder
, and I noticed that I got the results I was after by skipping the element.insertBefore
in app.js#265. I wonder if something like a noreorder
node attribute that does similar would work?
Thanks in advance to @jbucaran and @zaceno for their collective patience!
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (14 by maintainers)
componentWillReceiveProps
looks very similar to what @zaceno and I were talking about to do about #313, that is, to introduce a new lifecycle event:onpatch
. š¤Hopefully you didnāt consider my āwaste of timeā comment sarcasm or a snide remark about responsiveness, my initial writeup/problem/goals are just fuzzy enough that I was self conscious about my taking up you guysā time.
In the future I wonāt close any issues.
Cool, reopen the issue if you want.
Slightly back on topic however, something like reactās
componentWillReceiveProps
may allow me to pull off what I was originally after, but I need to rethink how Iām approaching the problem with Hyper to better articulate things.Thanks again!