You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dug in a bit and managed to resolve this trivial case + other variable declaration types (property, rest, member
expressions) by renaming them to props2
However when I looked at declarations in a nested block scope those would also be renamed when ideally they should remain unchanged
functionMyComponent(props){if(true){constprops='bar'// scoped to the if statement therefore should not be transformed}
Running into this issue today using the pure-component transform to update React from 15.6 => 16.8. Is the solution here to wait until the above PR is merged? Any guidance would be highly appreciated!
I'm raising this issue for awareness rather than an ask to fix as I spent some time trying to but found issues in recast which need resolving first.
The Problem
When using the pure-component transform there is an error if a
props
variable has already been declared in the render method:The above is transformed into:
Investigation
expressions) by renaming them to
props2
Let me know if you want me to share my code so far
The text was updated successfully, but these errors were encountered: