-
Notifications
You must be signed in to change notification settings - Fork 734
Update Constants.ts #1585
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
Update Constants.ts #1585
Conversation
Update RN version.
package.json
Outdated
"react-native": "0.64.1", | ||
"react-native": ">=0.65.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reverted, migrating to higher version of RN requires more than just changing the version in package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn’t know that, sorry about that.
I’ll fix.
Co-authored-by: Ethan Sharabi <[email protected]>
package.json
Outdated
@@ -99,7 +99,7 @@ | |||
"react": "17.0.1", | |||
"react-autobind": "^1.0.6", | |||
"react-dom": "^15.4.2", | |||
"react-native": "0.64.1", | |||
"react-native:"0.64.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed a "
"react-native:"0.64.1", | |
"react-native": "0.64.1", |
if (Dimensions.remove) { | ||
Dimensions.remove('change', callback); | ||
} else { | ||
Dimensions.removeEventListener('change', callback); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tacoelho I approved, but then noticed the build fails.
It's probably because of TS.
The best way to see the errors is to run npm run prepush
Anyway, you can use @ts-expect-error
for now
if (Dimensions.remove) { | |
Dimensions.remove('change', callback); | |
} else { | |
Dimensions.removeEventListener('change', callback); | |
} | |
// @ts-expect-error | |
if (Dimensions.remove) { | |
// @ts-expect-error | |
Dimensions.remove('change', callback); | |
} else { | |
Dimensions.removeEventListener('change', callback); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to include this in our upcoming release
I'll merge these changes and fix the last comments in master.
Thank you for your contribution
Fix #1582
Description
Listener removal to fix bug.
Changelog
Add remove() instead of removeListener to fix the error message