Closed alexbchr closed 5 years ago
@alexbchr I'm confused. What is the contradiction?
It's not really a contradiction, it's more the fact that no recommended usage is given, you just show the non-recommended usage in the documentation and sample app. It would be interesting to have the recommended usage too.
I feel like something is wrong in the wiki, because I think we do recommend this pattern. Something may have not been updated correctly when we made improvements to how the view model processes withState
calls before setState
.
@gpeal is it correct that the wiki says (which we don't recommend)
? I feel like we could just remove that
@alexbchr @elihart Yeah, that seems like an out of date doc. I remove it.
In the Wiki, you mention that you could do something like that to trigger a request only if it's not in the loading state:
However, a similar code is used in the code sample in the
DadJokeIndexViewModel
:However, since you don't recommend the approach, it would be interesting to know what is the recommended approach to implement this. The wiki and code sample should be updated accordingly too.