mobx-react@9 migration of a large project #3995
Unanswered
SimeonRolev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any tips on migrating a large project to
mobx-react@9
? There are some breaking changes:this.state | this.props
in class components'computed | autorun | reaction
callbacks
to observable contexts that referparent's this.state | this.props
I tried to find all the occurrences of the above using the VSCode search, but it's tricky, especially for callbacks that refer to parent's state/props.
I tried with regexes like
extends(.|\n)+render(.|\n)+<(.|\n)+this\.(props|state)(.|\n)+(/>|</)
to matchextends ...{ render ... (this.props | this.state) ... (/> or </) }
but it's a drag, really.Any other ideas to reduce runtime errors?
Beta Was this translation helpful? Give feedback.
All reactions