4 ms·
if you are going to update the DOM 60 times per second no databinding/reactive whatever framework makes sense. there is so much overhead with these solutions p
by camus2 12y ago
if you are going to update the DOM 60 times per second no databinding/reactive whatever framework makes sense.
there is so much overhead with these solutions performances would just be bad.
However it would be interesting to extract the virtual DOM from React to use it in the context DOM based games, being able to mark elements as dirty in order to redraw them is a usefull feature.One just doesnt need all the JSX/databinindg stuff for a game driven by a gameloop.
- spicyj 12y agoJSX is a build step and is completely optional. If by "databinding stuff" you mean React's setState and friends, almost all of React's code deals with the actual diffing and browser handling. Components are not much more than functions from props to a virtual DOM output. It's easy to use React without ever calling React.createClass (just pass the output of React.DOM to renderComponent). Still, we're looking at separating these parts of React so that you don't have to pay the file bytes but it's not a very significant difference right now anyway.
- camus2 12y agothanks for the info, i'll try to hack something with React for my next DOM based game and see if it works.