How can I display a comment after creating it?
I want to be able to create a comment and then display it with the rest of the comments without having to refresh the page. The problem is that whenever I create a comment, all of the properties are undefined (except for the body property which I am sending from the form) which…
Recursive async action
I have a service that executes a task that takes some time. The service has a REST endpoint that I can hit to get the progress status of the task. I've modeled the status as a value in my MST store. I want to kick off an action that will hit this REST endpoint every few seconds…
TypeScript typing for async actions - yield*
This is a topic that has been raised many times (here are a couple: https://github.com/mobxjs/mobx-state-tree/issues/1378, https://github.com/mobxjs/mobx-state-tree/issues/1516), and it's something that's always an immediate momentum-breaker when introducing anyone to MST. I…
What happens when state is updated while still calculating values?
Imagine I have a long dependency chain of calculated values. What will mobx-state-tree do if, while still calculating the views/calculated values, some of the dependencies (state) of that chain changes? Will it continue to solve the original equations, and then re-calculate with…
How to handle several sources of truth?
Hey all. What would be the best setup provided I have several sources of truth (GraphQL endpoints) that need to be queried. Im using MST and would like to add mst-gql. Also the GraphQL entity models can have the same name across those endpoints
Potential race condition?
Does anyone have any insight into whether it might be possible to end up with a race condition between a property that uses types.optional and values being set on that same property in afterAttach? Seeing some odd behavior, but I cannot replicate the problem myself. Seems to be…