datavis-tech / topologica

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

Chainable set #35

Closed curran closed 6 years ago

curran commented 6 years ago

Closes #33

This implementation returns this. It's simpler than the original implementation in #34, results in a slightly smaller bundle, and covers the desired use case.

Before:

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

After:

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

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