PDA

View Full Version : Can't switch two components when using Ext CLASSIC toolkit



eucaos
23 Oct 2018, 1:15 AM
When switching two components, Ext-React stacks them in the container instead of switching them.
I made full working demo for this here:
https://fiddle.sencha.com/#view/editor&fiddle/2msr


I also logged the issue here https://github.com/sencha/ext-react/issues/155

sarimarton
23 Oct 2018, 6:12 AM
I'm not Sencha personnel, so I can just share my perceptions about ExtReact, at least applied on the classic toolkit.

ExtReact on classic is far from being a fully featured React wrapper. It renders the components once, but re-rendering doesn't happen actually on state change. Also state is not integrated in the system, so at the moment it's best using the good old viewmodels for that. I have a workaround which loops in the viewmodel in a setstate-loop, you can get the idea here:

https://fiddle.sencha.com/?extreact#view/editor&fiddle/2mqa

Hope it helps.

eucaos
23 Oct 2018, 10:29 PM
So you suggest we should use only the Modern Toolkit Components from EXT-REACT ?
Are those components designed in another way which benefit more when used from EXT-REACT ?
Or it's the same situation for the Modern Toolkit Components as well ?

Celestial
29 Oct 2018, 9:25 AM
I don't know that modern has any advantage over classic.

And @sarimarton, I modified and simplified your example. Note that I'm not sure how the grid fits in -- as far as I can tell, the code is only supposed to update the text field label.
https://fiddle.sencha.com/?extreact#view/editor&fiddle/2n4i

Celestial
29 Oct 2018, 9:54 AM
When switching two components, Ext-React stacks them in the container instead of switching them.
I made full working demo for this here:
https://fiddle.sencha.com/#view/editor&fiddle/2msr


I also logged the issue here https://github.com/sencha/ext-react/issues/155



I simplified your example, but yes, that's weird. I'm not sure why it isn't just re-rendering the whole container, child and all. Note that if you open the debugger there's a log message "DID NOTHING IN REMOVE" coming from the framework code.

https://fiddle.sencha.com/#view/editor&fiddle/2n4l

eucaos
4 Dec 2018, 4:23 AM
Any thoughts on this one ? We can't do idiomatic react coding without this.


In react this is the basic mechanism to hide/show components.


Without it we have to do tons of workarounds while also affecting performance.