Re:Removing User Interface Complexity, or Why React is Awesome
by camus2 on Tuesday May 13, 2014 @11:40AM
(#7738679)
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.
Re:Removing User Interface Complexity, or Why React is Awesome
by spicyj on Tuesday May 13, 2014 @12:25PM
(#7738959)
JSX 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.
Re:Removing User Interface Complexity, or Why React is Awesome
by camus2 on Tuesday May 13, 2014 @02:54PM
(#7739916)
thanks for the info, i'll try to hack something with React for my next DOM based game and see if it works.
Re:Removing User Interface Complexity, or Why React is Awesome
by slattery on Wednesday May 14, 2014 @05:02PM
(#7746412)
Check out this example of a 3D game using React:
http://facebook.github.io/react/blog/2013/08/26/community-ro...
(Wolfenstein Rendering Engine Ported to React)
Since React claims to be super fact, has done a performance comparison to see in what situations and how much better react performs in certain cases, compared to say, angular.js or more vanilla frameworks?
(Also I hear that there is a really great speedup that using OM gives you, but I haven't seen any comparisons with om either)