Skip to content

Chainable set

Compare
Choose a tag to compare
@curran curran released this 09 Sep 12:19
· 42 commits to master since this release

This release modifies set to returned the instance, so that you can chain set calls. This is useful for constructing and setting the initial values of a Topologica instance in a single statement.

Before:

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

After:

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

PR: Chainable set #35