Hooks-Based WebGL Library for React
github.com
github.com
Conclusion I came to is that React itself is the bottleneck - even when you take ReactDOM out of the picture and even if you do nothing in the rendering phase. Ultimately, once you need several thousand entities, you end up with anti-patterns in order to squeeze out better performance, like keeping all your entities in arrays and objects instead of each being its own component.
YMMV and it's a cool idea - don't want to rag on hard work, but thought it might help to give a heads up of the trouble I ran into :)
What's unclear is why I should consider it over an alternative, and if indeed the authors think I should. Also, is it an experiment in the sense that it's a learning opportunity for the author, or does somebody think a serious advancement is being made?
Without answering these questions, it's hard or impossible to know in what context I would want to use this.
Now, this doesn't matter for every project, but I say this here since it's clear that effort has been put into making this approachable for somebody with no context.
The more general lesson here is that people don't just want to know what your project is. They also want to know if they should be using it. If you want your project to be used, one of the easiest things you can do is explain what problem your project solves and why somebody with that problem should use your project.
This is also what bothers me about reading academic papers. Generally, the set of people who both need the introduction and who can make use of the contents of the paper is an empty set.
[0] https://www.mitchellbusby.com/2016/11/14/reactjs-node-arduin...
[1] https://github.com/drcmda/react-three-fiber [2] https://news.ycombinator.com/item?id=19363595 [3] https://www.youtube.com/watch?v=70RNZHEc39Q&t=35
Edit: Think about it, the second option is the most plausible.
Ease-of-use looks good: https://github.com/sghall/react-vertex/blob/master/demos/Att...
Looks excellent actually.
My experience with React suggests the answer is "not well." (But I'd be happy to be proven wrong on that point!)
From my experience with React, if it's used properly so that the entire component tree isn't rendered every frame, I would expect the overhead of using to be almost nil. You can see in the examples the author using React.memo for this.
(Not without a lot of tricky caching, at least, which has it's own costs).
Not saying this is impractical (Personally, I wouldn't bet on it, but I'm sure it's fine for some things), so much as that the cost model here is fundamentally different.
Regarding React: In many webgl use-cases UI-framework overhead can be neglected as the user interacts either with the scene or the UI rendered by the framework. The browser doesn't usually need to update the DOM and the scene in one frame.
React performance may be a problem with less trivial scenes, but if you just want to get some 3D model on the screen it may be entirely sufficient.