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 +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -482,7 +482,15 @@ function codePushify(options = {}) {
482482 }
483483
484484 render ( ) {
485- return < RootComponent { ...this . props } ref = { "rootComponent" } />
485+ const props = { ...this . props } ;
486+
487+ // we can set ref property on class components only (not stateless)
488+ // check it by render method
489+ if ( RootComponent . prototype . render ) {
490+ props . ref = "rootComponent" ;
491+ }
492+
493+ return < RootComponent { ...props } />
486494 }
487495 }
488496 }
Original file line number Diff line number Diff line change 11// Adapted from https://raw.githubusercontent.com/facebook/react-native/master/local-cli/generator-android/templates/src/app/react.gradle
22
3+ import java.nio.file.Paths ;
4+
35def config = project. hasProperty(" react" ) ? project. react : [];
46def bundleAssetName = config. bundleAssetName ?: " index.android.bundle"
57
@@ -22,7 +24,10 @@ gradle.projectsEvaluated {
2224 def productFlavors = android. productFlavors. collect { flavor -> flavor. name }
2325 if (! productFlavors) productFlavors. add(' ' )
2426 def nodeModulesPath;
25- if (project. hasProperty(' nodeModulesPath' )) {
27+ if (config. root) {
28+ nodeModulesPath = Paths . get(config. root, " /node_modules" );
29+ }
30+ else if (project. hasProperty(' nodeModulesPath' )) {
2631 nodeModulesPath = project. nodeModulesPath
2732 } else {
2833 nodeModulesPath = " ../../node_modules" ;
You can’t perform that action at this time.
0 commit comments