Skip to content

Commit

Permalink
feat: update SvgPackage to supported stable API's (#2541)
Browse files Browse the repository at this point in the history
Address some deprecated API's in SVGPackage

# Summary

This improves compatibility with future React Native releases, which
will remove TurboReactPackage and the ReactModuleInfo constructor used.

## Test Plan

CI
  • Loading branch information
javache authored Nov 19, 2024
1 parent e85c727 commit 81e4692
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions android/src/main/java/com/horcrux/svg/SvgPackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static com.horcrux.svg.RenderableViewManager.*;

import androidx.annotation.Nullable;
import com.facebook.react.TurboReactPackage;
import com.facebook.react.BaseReactPackage;
import com.facebook.react.ViewManagerOnDemandReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.ModuleSpec;
Expand All @@ -36,7 +36,7 @@
SvgViewModule.class,
RNSVGRenderableManager.class,
})
public class SvgPackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
public class SvgPackage extends BaseReactPackage implements ViewManagerOnDemandReactPackage {

private @Nullable Map<String, ModuleSpec> mViewManagers;

Expand Down Expand Up @@ -369,7 +369,6 @@ public Map<String, ReactModuleInfo> getReactModuleInfos() {
moduleClass.getName(),
reactModule.canOverrideExistingModule(),
reactModule.needsEagerInit(),
reactModule.hasConstants(),
reactModule.isCxxModule(),
true));
}
Expand Down

0 comments on commit 81e4692

Please sign in to comment.