Skip to content

fix react-native 0.74 Use invalidate method instead onCatalystInstanceDestroy #1088

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void initialize() {
}

@Override
public void onCatalystInstanceDestroy() {
public void invalidate() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalidate was introduced in 0.65: facebook/react-native@18c8417#diff-736ae7997f3da9751f0f5cf756d8ce4401190bda205c894acc77efe959bd1ecb

Our package.json says we still support 0.60:

"react-native": "^0.0.0-0 || >=0.60 <1.0"

In order to make this change, we will also need to bump the minimum version to 0.65. This means we will have to make a major release.

And since onCatalystInstanceDestroy was removed in 0.74, it looks like this is the simpler path than maintaining two AsyncStorageModule.java.

@krizzu?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, let's bump to min 0.65 and do major release

mShuttingDown = true;
}

Expand Down