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
{{ message }}
Repository navigation
Commit 70bdf0c
Browse filesBrowse the repository at this point in the historyBrowse files
docs(getting-started): remove outdated version notes (#5213)
The 6.x Getting Started page no longer has notes for versions 6.x doesn't support: the `.babelrc` note for React Native 0.55 and older, the `.flowconfig` section and the note about `Provider` before Paper 5.8.0. The theme paragraph names `PaperProvider`, as the rest of the page does, and the requirement lists use colons instead of em dashes.
Part of #4991.
Copy file name to clipboardExpand all lines: docs/6.x/docs/guides/getting-started.mdx
+4-17Lines changed: 4 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Minimum requirements:
33
33
-`react-native`**≥ 0.81**
34
34
-`react-native-reanimated`**≥ 4.3.0**
35
35
-`react-native-worklets`**≥ 0.8.1**
36
-
-`react-native-safe-area-context` — version compatible with your React Native toolchain.
36
+
-`react-native-safe-area-context`: a version compatible with your React Native toolchain.
37
37
38
38
You also need to install [@react-native-vector-icons/material-design-icons](https://github.com/oblador/react-native-vector-icons/tree/master/packages/material-design-icons), because some components use these icons internally:
39
39
@@ -59,7 +59,7 @@ Minimum requirements:
59
59
-`react-native`**≥ 0.81**
60
60
-`react-native-reanimated`**≥ 4.3.0**
61
61
-`react-native-worklets`**≥ 0.8.1**
62
-
-`react-native-safe-area-context` — version compatible with your React Native toolchain.
62
+
-`react-native-safe-area-context`: a version compatible with your React Native toolchain.
63
63
64
64
Follow the [React Native Reanimated installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/).
65
65
@@ -123,22 +123,9 @@ The plugin only works if you are importing the library using ES2015 import state
123
123
124
124
If your `babel.config.js` also lists `react-native-worklets/plugin`, as Reanimated requires for Community CLI projects, keep it in the top-level `plugins`. Babel adds the `env.production` plugins after it, which is fine because `react-native-paper/babel` only rewrites `import` statements.
125
125
126
-
:::note
127
-
The above examples are for the latest `react-native` using Babel 7. If you have `react-native <= 0.55`, you'll have a `.babelrc` file instead of a `babel.config.js` file and the content of the file will be different.
128
-
:::
129
-
130
-
If you're using Flow for typechecking your code, you need to add the following under the `[options]` section in your `.flowconfig`:
131
-
132
-
```ini
133
-
module.file_ext=.js
134
-
module.file_ext=.native.js
135
-
module.file_ext=.android.js
136
-
module.file_ext=.ios.js
137
-
```
138
-
139
126
## Usage
140
127
141
-
Wrap your root component in `PaperProvider` from `react-native-paper`(if you are using versions prior to 5.8.0 you need to use `Provider`). If you have a vanilla React Native project, it's a good idea to add it in the component which is passed to `AppRegistry.registerComponent`. This will usually be in the `index.js` file. If you have an Expo project that uses Expo Router (the default for new Expo projects), wrap the content of your root layout, `app/_layout.tsx` (or `src/app/_layout.tsx`). In an Expo project without Expo Router, you can do this inside the exported component in the `App.js` file.
128
+
Wrap your root component in `PaperProvider` from `react-native-paper`. If you have a vanilla React Native project, it's a good idea to add it in the component which is passed to `AppRegistry.registerComponent`. This will usually be in the `index.js` file. If you have an Expo project that uses Expo Router (the default for new Expo projects), wrap the content of your root layout, `app/_layout.tsx` (or `src/app/_layout.tsx`). In an Expo project without Expo Router, you can do this inside the exported component in the `App.js` file.
142
129
143
130
Example:
144
131
@@ -199,7 +186,7 @@ export default function Main() {
199
186
200
187
## Customization
201
188
202
-
You can provide a custom theme to customize the colors, typescales etc. with the `Provider` component. Check the [Material Design 3 default theme](https://github.com/callstack/react-native-paper/blob/main/src/theme/schemes/LightTheme.tsx) to see what customization options are supported.
189
+
You can provide a custom theme to customize the colors, typescales etc. with the `PaperProvider` component. Check the [Material Design 3 default theme](https://github.com/callstack/react-native-paper/blob/main/src/theme/schemes/LightTheme.tsx) to see what customization options are supported.
0 commit comments