WebReflection / augmentor

Extensible, general purpose, React like hooks for the masses.
https://medium.com/@WebReflection/demystifying-hooks-f55ad885609f
ISC License
134 stars 7 forks source link

useState causing whole node to change #8

Closed dakom closed 5 years ago

dakom commented 5 years ago

Picking up from #2 - but without any of the useMemo or useContext complexity - it seems that useState itself (or maybe with useEffect?) is causing entire dom nodes to re-render when state changes.

See: https://codepen.io/dakom/pen/bOyzqd

WebReflection commented 5 years ago

so, version 1.0.6 uses the effect after, on next tick, right before. I hope that works, but I have to go now so we'll see in the future 👋

WebReflection commented 5 years ago

I see the issue doesn't seem to be solved, but I really have to go now so I'll try to figure out what the hell is going on, since other demos are just fine.

Take of the day: magic is hard.

luwes commented 5 years ago

I stumbled on the same issue today with nesting Not sure if it was the same but lighterhtml 0.7.0 fixed it for me. https://github.com/luwes/swiss-element/tree/master/fixtures/lighterhtml

WebReflection commented 5 years ago

closing this as it's not strictly related to augmenter and the demo uses neverland, which is another project