Skip to content

Commit 70bdf0c

Browse files
authored
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.
1 parent e771fce commit 70bdf0c

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

‎docs/6.x/docs/guides/getting-started.mdx‎

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Minimum requirements:
3333
- `react-native` **≥ 0.81**
3434
- `react-native-reanimated` **≥ 4.3.0**
3535
- `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.
3737

3838
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:
3939

@@ -59,7 +59,7 @@ Minimum requirements:
5959
- `react-native` **≥ 0.81**
6060
- `react-native-reanimated` **≥ 4.3.0**
6161
- `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.
6363

6464
Follow the [React Native Reanimated installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/).
6565

@@ -123,22 +123,9 @@ The plugin only works if you are importing the library using ES2015 import state
123123

124124
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.
125125

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-
139126
## Usage
140127

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.
142129

143130
Example:
144131

@@ -199,7 +186,7 @@ export default function Main() {
199186

200187
## Customization
201188

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.
203190

204191
Example:
205192

0 commit comments

Comments
 (0)