Closed leonardo2204 closed 3 years ago
Normalmente quando o StoreConnector não detecta alteração no ViewModel é porque ele acha que o ViewModel não mudou. Você pode criar um toString()
detalhado do ViewModel, e daí dar um print
do ViewModel dentro do fromStore()
pra entender porque isso está acontecendo.
Parece correto assim a primeira vista, mas é muito difícil achar erros assim. Se vc quiser minha ajuda, vc precisa me passar um código mínimo, reprodutível, que demonstre o seu problema, tudo em um único arquivo e sem dependências, para que eu possa rodar facilmente aqui na minha máquina.
Normally when the StoreConnector does not detect a change in the ViewModel it thinks that the ViewModel has not changed. You can create a detailed ViewModel toString(), and then give a printout of the ViewModel inside fromStore() to understand why this is happening.
It looks correct at first glance, but it is very difficult to find errors like this. If you want my help, you need to send me some minimal, reproducible code that demonstrates your problem, all in a single file and without dependencies, so I can easily run it here on my machine.
(deepl translation)
Hi @marcglasberg,
I'm having a problem using sub-state (again), I've created an error screen which has a retry button. The problem is that my ViewModel is not being fired, thus the retry screen stays forever. My code:
And finally:
Is this the right approach? BTW it would be nice to have an enhanced example, using multiple screens and sub-states!
Thanks