Files
pezkuwi-ui/packages/exampleReactNative
Github Actions 120fe69329 [CI Skip] release/beta 0.81.2-5
skip-checks: true
2021-06-25 11:34:16 +00:00
..
2020-01-15 13:54:19 +01:00
2021-01-24 12:24:56 +01:00
2019-10-10 21:22:21 +02:00
2021-01-03 11:46:19 +01:00
2021-01-03 11:46:19 +01:00
2021-01-03 11:46:19 +01:00
2021-01-03 11:46:19 +01:00
2021-01-03 11:46:19 +01:00
2021-06-25 11:34:16 +00:00
2019-10-10 21:22:21 +02:00

Running

For iOS, make sure that Xcode and CocoaPods are installed.

For Android, make sure that Android Studio and a JDK are installed.

At the repo root, run the bundler yarn example:rn:packager and, in a new terminal, yarn example:rn:ios or yarn example:rn:android.

If the iOS run complains about a missing simulator, use yarn ios --simulator="iPhone 11", where iPhone 11 is replaced with an installed simulator (see xcrun simctl list devices)

The first time metro bundles the package, it will hang at 98% and take about 10 minutes to finish. Just refresh the simulator when it finishes.

Packages

Native packages need to be added to nohoist in the package.json. There is no need to link them, but cd ios && pod install must be run after yarn adds the package.

Non-native packages can be yarn added as usual.

Replacements for node builtin packages can be added in the extraNodeModules section of metro.config.js. Some node packages will expect global variables to be set, these are set in nodeGlobalsShim.js

Yarn Workspaces

Metro will watch the build dirs of the packages in packages/* for changes, as well as use the node_modules of the root folder. However, packages that depend on the nohoisted react-native , such as reactnative-identicon, must be copied to the local node_modules folder. See metro.config.js and package.json's scripts for details.

Screenshots

iOs Android