This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import requestFetchAdapter from "./request-fetch-adapter";
44import { AppState , Platform } from "react-native" ;
55import RestartManager from "./RestartManager" ;
66import log from "./logging" ;
7+ import hoistStatics from 'hoist-non-react-statics' ;
78
89let NativeCodePush = require ( "react-native" ) . NativeModules . CodePush ;
910const PackageMixins = require ( "./package-mixins" ) ( NativeCodePush ) ;
@@ -451,7 +452,7 @@ function codePushify(options = {}) {
451452 }
452453
453454 var decorator = ( RootComponent ) => {
454- return class CodePushComponent extends React . Component {
455+ const extended = class CodePushComponent extends React . Component {
455456 componentDidMount ( ) {
456457 if ( options . checkFrequency === CodePush . CheckFrequency . MANUAL ) {
457458 CodePush . notifyAppReady ( ) ;
@@ -503,6 +504,8 @@ function codePushify(options = {}) {
503504 return < RootComponent { ...props } />
504505 }
505506 }
507+
508+ return hoistStatics ( extended , RootComponent ) ;
506509 }
507510
508511 if ( typeof options === "function" ) {
Original file line number Diff line number Diff line change 1919 "dependencies" : {
2020 "code-push" : " 1.11.2-beta" ,
2121 "glob" : " ^5.0.15" ,
22+ "hoist-non-react-statics" : " ^2.3.1" ,
2223 "inquirer" : " 1.1.2" ,
2324 "plist" : " 1.2.0" ,
2425 "xcode" : " 0.9.2"
You can’t perform that action at this time.
0 commit comments