Replies: 2 comments
-
I also run into this from time to time. I will say that I've rarely needed much more from MST in way of debugging, because I usually know what model or models I've been mucking about with. But it can be frustrating when receiving information from something like a third party API that changes. In the reproduction you've provided, would your ideal state be an addition to the error message that basically says something like:
|
Beta Was this translation helpful? Give feedback.
-
I'm going to convert this to a discussion, because I don't think it's really a bug, but I do think it's excellent feedback, and we should consider improving this developer experience. |
Beta Was this translation helpful? Give feedback.
-
value
<TYPE A>
is not assignable to type:<TYPE B>
(Value is not a<TYPE B>
).is a common message when changing a value in Mobx State Tree. However it lacks enough definition to find the code culprit(s) leading to a dead end error message or, in some case, a complete app crash with little to no data references.
Is your feature request related to a problem? Please describe.
Yes. There was an entire ticket here but a bot auto closed it and I believe more context was warranted.
Describe the solution you'd like
A more descriptive options from the error messaging. and a solution to the inline Typescript errors.
Describe alternatives you've considered
I've tried wrapping the model reference in additional catch layers but have been unsuccessful.
Additional context
You can view my repo illustrating the problem here
And I made a Youtube Video about the whole issue as well.
Are you willing to (attempt) a PR?
Beta Was this translation helpful? Give feedback.
All reactions