mobxjs / mobx-state-tree

Full-featured reactive state management without the boilerplate
https://mobx-state-tree.js.org/
MIT License
6.99k stars 641 forks source link

Asynchronous actions generator yield stuck #2213

Closed rose4096 closed 2 months ago

rose4096 commented 2 months ago

Bug report

Sandbox link or minimal reproduction code

https://github.com/rose4096/mobx-state-tree-issue

Describe the expected behavior

The list of clients appears within the store when the promise is consumed by the generator

Describe the observed behavior

It stops on the yield and never continues even though the promise completes

Additional notes

When doing a next.js quick refresh (editing/saving the project) the clients render, but when doing a full refresh the clients do not render although the network request happens / the promise completes.

rose4096 commented 2 months ago

I'm not sure that this is a bug, but I attempted to follow the documentation and ran into this issue.

rose4096 commented 2 months ago

This issue was actually user error. My upper level component wasn't set to observable, apologies.

coolsoftwaretyler commented 2 months ago

Glad ya figured it out. That one still gets me from time to time haha.