-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1349 from flexn-io/feat/upgrade_to_rn73
Upgrade to RN 73
- Loading branch information
Showing
110 changed files
with
5,826 additions
and
6,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
presets: ['module:metro-react-native-babel-preset'], | ||
presets: ['module:@react-native/babel-preset'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...-harness/appConfigs/harness/builds/android/app/src/main/java/rnv_template/MyAppPackage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package {{APPLICATION_ID}} | ||
|
||
import android.view.View | ||
import com.facebook.react.ReactPackage | ||
import com.facebook.react.bridge.NativeModule | ||
import com.facebook.react.bridge.ReactApplicationContext | ||
import com.facebook.react.uimanager.ReactShadowNode | ||
import com.facebook.react.uimanager.ViewManager | ||
|
||
class MyAppPackage : ReactPackage { | ||
|
||
override fun createViewManagers( | ||
reactContext: ReactApplicationContext | ||
): MutableList<ViewManager<View, ReactShadowNode<*>>> = mutableListOf() | ||
|
||
override fun createNativeModules( | ||
reactContext: ReactApplicationContext | ||
): MutableList<NativeModule> = listOf(TestNativeModule(reactContext)).toMutableList() | ||
} |
20 changes: 20 additions & 0 deletions
20
...ness/appConfigs/harness/builds/android/app/src/main/java/rnv_template/TestNativeModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package {{APPLICATION_ID}} | ||
|
||
import com.facebook.react.bridge.NativeModule | ||
import com.facebook.react.bridge.ReactApplicationContext | ||
import com.facebook.react.bridge.ReactContext | ||
import com.facebook.react.bridge.ReactContextBaseJavaModule | ||
import com.facebook.react.bridge.ReactMethod | ||
import com.facebook.react.bridge.Callback | ||
|
||
|
||
class TestNativeModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { | ||
override fun getName() = "TestNativeModule" | ||
|
||
@ReactMethod | ||
fun createTestEvent(name: String, location: String, callback:Callback) { | ||
var result = "Event called with name: $name and location: $location" | ||
callback.invoke(null, result) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { NativeModules, Button } from 'react-native'; | ||
|
||
const NewModuleButton = () => { | ||
const { TestNativeModule } = NativeModules; | ||
const callback = (error: any, result: string) => { | ||
if (error) { | ||
console.log(error); | ||
} else { | ||
console.log(result); | ||
} | ||
}; | ||
const onPress = () => { | ||
TestNativeModule.createTestEvent('testName', 'testLocation', callback); | ||
}; | ||
return <Button title="Click to invoke native module!" color="#841584" onPress={onPress} />; | ||
}; | ||
|
||
export default NewModuleButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
{ | ||
"extends": "@flexn/typescript-config/tsconfig.app.json", | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"rootDir": ".", | ||
"noImplicitAny": false, | ||
// "resolveJsonModule": false | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
"extends": "@flexn/typescript-config/tsconfig.app.json", | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"rootDir": ".", | ||
"noImplicitAny": false, | ||
// "resolveJsonModule": false | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"strictNullChecks": true | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"platformBuilds/template_web/.next/types/**/*.ts", | ||
"platformBuilds/harness_web/.next/types/**/*.ts", | ||
".next/types/**/*.ts", | ||
"platformBuilds/harness_web/output/types/**/*.ts" | ||
], | ||
"strictNullChecks": true | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"platformBuilds/template_web/.next/types/**/*.ts", | ||
"platformBuilds/harness_web/.next/types/**/*.ts", | ||
".next/types/**/*.ts", | ||
"platformBuilds/harness_web/output/types/**/*.ts" | ||
] | ||
"exclude": ["**/rn_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.