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
After react-native upgrade to 0.59.8, @babel/plugin-transform-regenerator requires downgrade to v7.4.4 (which used v0.13.4) or you will get 'ready-only' errors. (seemed to happen with things connected in mapDispatchToProps in our case.)
Took me a while to track down the right package. Looks like it is regenerator. For me, it happens whenever I use a redux dispatch pattern in an async function. For example,
import{setLoading}from'../actions/loading'import{connect}from'react-redux'...classTestComponent{someMethod=async()=>{// Shadowed variable, but no assignmentconst{ setLoading }=this.props// expected (v0.13.4): setLoading = _this.props.setLoading;// actual (v0.14.0): _loading.setLoading = (_this.props.setLoading, function () {// throw new Error('"' + "setLoading" + '" is read-only.');// }());}}
...
connect(null,{ setLoading })(TestComponent)
I've a async function, when destructuring and save const show me error: Possible Unhandled Promise Rejection (id: 0): Error: “userOperations” is read-only , this worked for me (change let by const):
After react-native upgrade to 0.59.8, @babel/plugin-transform-regenerator requires downgrade to v7.4.4 (which used v0.13.4) or you will get 'ready-only' errors. (seemed to happen with things connected in mapDispatchToProps in our case.)
"Possible Unhandled Promise Rejection (id: 0): Error: “[some function]” is read-only"
See https://stackoverflow.com/questions/56340427/possible-unhandled-promise-rejection-id-0-error-getlogindata-is-read-only
The text was updated successfully, but these errors were encountered: