5 ms·
I might be missing something here: what benefit does React bring in this example? If you're using canvas to render without any kind of virtual DOM, why use Reac
by simonw 11y ago
I might be missing something here: what benefit does React bring in this example? If you're using canvas to render without any kind of virtual DOM, why use React at all?
- seivan 11y agoCan't you combine? Thinking it could be used for UI. Makes sense when you need more support, like localisation and other builtin stuff. Just guessing.
- avolcano 11y agoOh, nothing on its own in that tiny example. In practice, it's just a component that could be used in a larger application and can be easily tied into the same rendering and state trees.
- untog 11y agoFrom my understanding, React Canvas handles which parts to redraw for you. Redrawing the entire Canvas with each frame is not performant.