News for hackers. Stuff that matters.
Re:Building a Front End Framework; Reactivity, Composability... by wbobeirne on Sunday May 14, 2023 @03:03PM (#35940438)
This definitely works until you hit one of a few cases I can think of:

* Adding animations to elements. By blowing away the DOM and inserting new elements each time, you'll trigger any css `animation` for new elements entering.

* Stale data. If your template isn't re-run when some data changes for whatever reason, you'll continue to render the old data. You've got to manage the lifecycle of state updates yourself.

* To counter that, you might just re-run your templates when _anything_ changes. This works until you have a significant amount of data, then performance starts to become an issue.

This won't come up for many cases though, so for simpler apps it's definitely more than enough!

There are no comments on this comment yet.