Comment

Comment by erikpukinskis

> the actual data and state you need to distribute to them has a structure that is completely unrelated to how its laid out in the DOM.

It took me many years to realize this. I think very few front end developers understand this. And more problematically: very few framework devs seem to understand it.

Stated another way....

Your tree of UI widgets, and

Your tree of data which feeds those widgets

... are two orthogonal trees.

If you are a front end dev and you haven’t spend time wrestling with that, I strongly recommend it. It’s extremely likely your front end architecture is suffering because of it.

React take the strongest stance on this matter, by making the interface to every widget be one giant shared global. But globals are bad, so while it’s good they acknowledge the situation, they mostly punt on the question of how to deal with it.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton