Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


Can'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.


Oh, 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.


From my understanding, React Canvas handles which parts to redraw for you. Redrawing the entire Canvas with each frame is not performant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: