Skip to content
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 SpatialiteReactPackage.java #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 @@ -11,19 +11,19 @@
import java.util.Collections;

public class SpatialiteReactPackage implements ReactPackage {
@Override

This conversation was marked as resolved.
Show resolved Hide resolved
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
Copy link
Contributor

Choose a reason for hiding this comment

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

But the official doc says that createViewManagers and createNativeModules should be decorated with @Override here https://facebook.github.io/react-native/docs/native-modules-android.
Maybe this was a breaking change because createJSModules is not longer in the docs. We should check and upgrade the react-native package on the peerDependencies@ package.json to be clear of the breaking change.

Copy link
Contributor

Choose a reason for hiding this comment

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

[email protected] removed createJSModules on Android.
We can delete the createJSModules completly and we should keep the @Override decorator on the other 2 methods.
And we should upgrade the peerDependencies for react-native@>=0.47.0

List<NativeModule> modules = new ArrayList<>();
modules.add(new SpatialiteModule(reactContext));
return modules;
}

@Override

This conversation was marked as resolved.
Show resolved Hide resolved
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}

@Override

This conversation was marked as resolved.
Show resolved Hide resolved
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
Expand Down