-
Notifications
You must be signed in to change notification settings - Fork 641
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
Dynamically append/amend types #326
Comments
There is no included solution yet, please see #247 for proposal and please give feedback on what do you expect to be able to do there :) |
@mattiamanzati sorry, haven't seen the PR. Ok, thanks, moving to #247 |
No problem! :) |
I would like to migrate my custom orm solution to mst for our react-native app. We don't use typescript and we dynamically load data from our rest api. I do not want to document every detail of the data in our code. I hoped it would be as easy as starting with an empty model like so https://codesandbox.io/s/kkw1o3ory7 and then define actions on it. but mst only seems to accept entries that are defined on the model. I would love to use this for the observable data, actions and patches. My current solution is not observable (I have to keep a version number per collection to decide what to rerender) but I do have actions and patches. It would be awesome if I could throw away all that code and just use a simple api. Is there currently any way to dynamically fill models with data or is that closed pull request my only hope? |
Hello. I have some dynamically-loaded parts of my codebase, and because of that, I cannot build the entire store model at startup.
Is there any way to append properties to existed types after they are created?
Example:
The text was updated successfully, but these errors were encountered: