3 ms·
Rather than repeat, I will just link you to: http://gamedev.stackexchange.com/questions/24103/immediate-gui-yae-or-nay http://gamedev.stackexchange.com/questio
by laythea 10y ago
Rather than repeat, I will just link you to:
http://gamedev.stackexchange.com/questions/24103/immediate-gui-yae-or-nay http://gamedev.stackexchange.com/questions/24103/immediate-g...
- realharo 10y agoThat talks about game UIs, which are indeed much more difficult to work with, e.g. >The GUI library consists of one-shot "RenderButton", "RenderLabel", "RenderTextBox"... functions >all RenderXXX functions that have user interaction like a buttons or checkbox have return values that indicate whether e.g. the user clicked into the button. But React is nothing like that. Writing JSX very much resembles writing HTML, which makes the tree structure easy to read/write, you bind event handlers to elements (`onClick={this.helloClicked}`) just like you could with HTML, passing data (props) to child components is trivially simple etc. That's why I wrote "assuming you have good enough primitives to work with" in my previous comment. With game UI libraries, you often don't, and often there are limitations in the language itself that prevent the libraries from being good enough. When you have a nice environment to work with, all that retained mode does is duplicate the state - so you have your application data, plus the internal state of the UI component, or even the larger structure of the components - and it places the additional burden of keeping them in sync on your shoulders.