Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an example of a more complex MST Setup #12

Open
cdanwards opened this issue Oct 10, 2022 · 0 comments
Open

Create an example of a more complex MST Setup #12

cdanwards opened this issue Oct 10, 2022 · 0 comments

Comments

@cdanwards
Copy link
Member

cdanwards commented Oct 10, 2022

From a slack discussion in e-mobx-state-tree:

I need some help on a MST issue I'm running into. I've been discussing with Yulian & Frank about this and haven't been able to find a solution.
Has anyone run into the issue where when you do extend(withRootStore) you start getting a recursion error and all your stores types are any? This seems to happen when you incorporate both actions and views, but not when its one or the other.
Tried to fix using: types.late(...), getParent(self, 1), getRoot(self)...
Here is a link to the issue that Frank put together: [https://snack.expo.dev/@frankcalise/recursive-mst —see comment in character-store.ts](https://snack.expo.dev/@frankcalise/recursive-mst —see comment in character-store.ts)

Another Snack where Carlin got it working:
https://snack.expo.dev/e9Cnocf5b

@cdanwards cdanwards changed the title More complex MST Setup Create an example of a more complex MST Setup Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant