3 ms·
I've done the opposite: use d3 to provide React-like semantics. - Basically the data fetches get pushed to a lightweight queue/topic system in the browser (usi
by athenot 10y ago
I've done the opposite: use d3 to provide React-like semantics.
- Basically the data fetches get pushed to a lightweight queue/topic system in the browser (using publish.js).
- Each part of the page listens for messages it cares about and updates the page accordingly.
There is still some of the d3 plumbing (I must specify how updates differ from mere element creations, and handle the exits). But I still get a nice decoupling between the different parts of my app. Coupled with browserify, this ends up with semantics not unlike Erlang (I even named the listener method "receive" and it acts on patterns of messages).