datavis-tech / topologica

Minimal library for reactive dataflow programming. Based on topological sort.
MIT License
50 stars 1 forks source link

Chainable Set #33

Closed curran closed 5 years ago

curran commented 5 years ago

It would be useful if set returned the instance, so that you can chain set calls.

For example, setting up the Topologica instance on a D3 local and setting the selection.

Before:

const state = Topologica({ circlesDOM });
state.set({ selection });
return state;

After:

return Topologica({ circlesDOM }).set({ selection });

Full example: https://vizhub.com/curran/27c261085d8a48618c69f7983672903b