2 ms·
I've been working on a ES6 composition-based library that might help out here: https://www.npmjs.com/package/fabricant https://www.npmjs.com/package/fabricant
by davedx 11y ago
I've been working on a ES6 composition-based library that might help out here: https://www.npmjs.com/package/fabricant https://www.npmjs.com/package/fabricant
The idea is you declare which components will be needed and the library takes care of instantiating objects with the necessary components for you. It works something like Unity (the game engine)'s entity-component architecture.
I haven't tried to get it working with React yet though, I've been playing with threejs instead :)