React Three UI – Experimenting with React as an Interface for 3D UIs
github.com
github.com
Three.js is such a joy to code in because it has a great API and works well with functional javascript.
Not everything needs to be declarative, and if you need a model for your three.js application there's nothing preventing you from using something immutable.
The trend to React-wrap all the things is truly baffling to me. Some problems are just not meant for this. It works well for HTML/CSS and UIs because these have always been declarative, so is a natural fit and is a superset plus sugar.
This is the case with low-level components, which is why React's lifecycle methods make it so easy to fall back on imperative code.
> The trend to React-wrap all the things is truly baffling to me. Some problems are just not meant for this. It works well for HTML/CSS and UIs because these have always been declarative, so is a natural fit and is a superset plus sugar.
My mind may be twisted from working with React every day, but I would say that a declarative API tends to be more natural when building real world applications. Not just for HTML and UI. At Facebook for example, we declaratively describe the data needs of each component and mutation using GraphQL and Relay.
React could then optionally be wrapped on top of that in a way that adds value.
Three.js' API is great for 3D programming but creating UIs suffers the same problems as creating UIs with plain JS in the DOM.
Also, no need to feel sorry! This is just an exploration at this point, so it's interesting for me to hear peoples' reactions whatever they may be.
https://hacks.mozilla.org/2016/03/build-the-virtual-reality-...