You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-22Lines changed: 13 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ We want this community to be friendly and respectful to each other. Please follo
9
9
This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
10
10
11
11
- The library package in the root directory.
12
-
- An example app in the `example/` directory.
12
+
- A vanilla React Native example app in the `example/` directory.
13
+
- An Expo example app in the `expo-example/` directory.
13
14
14
15
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
15
16
@@ -21,26 +22,26 @@ yarn
21
22
22
23
This project uses Nitro Modules. If you're not familiar with how Nitro works, make sure to check the [Nitro Modules Docs](https://nitro.margelo.com/).
23
24
24
-
You need to run [Nitrogen](https://nitro.margelo.com/docs/nitrogen) to generate the boilerplate code required for this project. The example app will not build without this step.
25
+
You need to run [Nitrogen](https://nitro.margelo.com/docs/nitrogen) to generate the boilerplate code required for this project.
25
26
26
-
Run **Nitrogen** in following cases:
27
-
28
-
- When you make changes to any `*.nitro.ts` files.
29
-
- When running the project for the first time (since the generated files are not committed to the repository).
30
-
31
-
To invoke **Nitrogen**, use the following command:
27
+
Run **Nitrogen** when you make changes to any `*.nitro.ts` files:
32
28
33
29
```sh
34
30
yarn nitrogen
35
31
```
36
32
37
-
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
33
+
This also runs automatically via the `prepare` script when you run `yarn`.
34
+
35
+
The example apps demonstrate usage of the library. You need to run one to test any changes you make.
38
36
39
-
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
37
+
Both are configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example apps. Changes to the library's JavaScript code will be reflected without a rebuild, but native code changes will require a rebuild.
40
38
41
-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/RiveExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-rive`.
39
+
To edit native codein Xcode or Android Studio, you can use:
42
40
43
-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-rive` under `Android`.
41
+
```sh
42
+
yarn dev:ios # Opens iOS project in Xcode
43
+
yarn dev:android # Opens Android project in Android Studio
44
+
```
44
45
45
46
You can use various commands from the root directory to work with the project.
46
47
@@ -62,14 +63,6 @@ To run the example app on iOS:
62
63
yarn example ios
63
64
```
64
65
65
-
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
66
-
67
-
```sh
68
-
Running "RiveExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
69
-
```
70
-
71
-
Note the `"fabric":true` and `"concurrentRoot":true` properties.
72
-
73
66
Make sure your code passes TypeScript and ESLint. Run the following to verify:
74
67
75
68
```sh
@@ -134,8 +127,6 @@ The `package.json` file contains various scripts for common tasks:
134
127
135
128
### Sending a pull request
136
129
137
-
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
138
-
139
130
When you're sending a pull request:
140
131
141
132
- Prefer small pull requests focused on one change.
Copy file name to clipboardExpand all lines: README.md
+31-44Lines changed: 31 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,63 +4,50 @@ Rive React Native 2.0
4
4
5
5
## Requirements
6
6
7
-
- React Native 0.79 or later
8
-
- Xcode 16.0 or later
7
+
-**React Native**: 0.78 or later (0.79+ recommended for better Android error messages)
8
+
-**Expo SDK**: 53 or later (for Expo users)
9
+
-**iOS**: 15.1 or later
10
+
-**Android**: SDK 24 (Android 7.0) or later
11
+
-**Xcode**: 16.4 or later
12
+
-**JDK**: 17 or later
13
+
-**Nitro Modules**: 0.25.2 or later
9
14
10
15
## Known Issues
11
16
12
-
- Error message on Android will not have descriptive messages, this is a [known issue](https://github.com/mrousavy/nitro/issues/382) in React Native and is fixed in RN 0.80
17
+
- Error messages on Android in React Native 0.78-0.79 may not be descriptive, this is a [known issue](https://github.com/mrousavy/nitro/issues/382) in React Native and is fixed in RN 0.80
Copy file name to clipboardExpand all lines: example/README.md
-42Lines changed: 0 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,6 @@ First, you will need to run **Metro**, the JavaScript build tool for React Nativ
11
11
To start the Metro dev server, run the following command from the root of your React Native project:
12
12
13
13
```sh
14
-
# Using npm
15
-
npm start
16
-
17
-
# OR using Yarn
18
14
yarn start
19
15
```
20
16
@@ -25,10 +21,6 @@ With Metro running, open a new terminal window/pane from the root of your React
25
21
### Android
26
22
27
23
```sh
28
-
# Using npm
29
-
npm run android
30
-
31
-
# OR using Yarn
32
24
yarn android
33
25
```
34
26
@@ -51,47 +43,13 @@ bundle exec pod install
51
43
For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
52
44
53
45
```sh
54
-
# Using npm
55
-
npm run ios
56
-
57
-
# OR using Yarn
58
46
yarn ios
59
47
```
60
48
61
49
If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.
62
50
63
51
This is one way to run your app — you can also build it directly from Android Studio or Xcode.
64
52
65
-
## Step 3: Modify your app
66
-
67
-
Now that you have successfully run the app, let's make changes!
68
-
69
-
Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).
70
-
71
-
When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:
72
-
73
-
-**Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).
74
-
-**iOS**: Press <kbd>R</kbd> in iOS Simulator.
75
-
76
-
## Congratulations! :tada:
77
-
78
-
You've successfully run and modified your React Native App. :partying_face:
79
-
80
-
### Now what?
81
-
82
-
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
83
-
- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).
84
-
85
53
# Troubleshooting
86
54
87
55
If you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
88
-
89
-
# Learn More
90
-
91
-
To learn more about React Native, take a look at the following resources:
92
-
93
-
-[React Native Website](https://reactnative.dev) - learn more about React Native.
94
-
-[Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
95
-
-[Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
96
-
-[Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
97
-
-[`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
0 commit comments