Skip to content

Commit cca6ce6

Browse files
authored
docs: small tweaks to readmes (#231)
1 parent a2306e0 commit cca6ce6

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

INSTALL.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Version >= 12 requires React Native 0.73 / Expo 50 or newer (because of `unstabl
44

55
Version >= 11 requires React Native 0.71 / Expo 48 or newer. Use version 10 if you're on older version of RN / Expo.
66

7-
0. In your `tsconfig.json`, make sure you have [`"moduleResolution": "NodeNext"`](https://www.typescriptlang.org/tsconfig#moduleResolution) set. This is required for TS to see the typings exported via [package.json `exports`](https://reactnative.dev/blog/2023/06/21/package-exports-support).
7+
1. In your `tsconfig.json`, make sure you have [`"moduleResolution": "NodeNext"`](https://www.typescriptlang.org/tsconfig#moduleResolution) set. This is required for TS to see the typings exported via [package.json `exports`](https://reactnative.dev/blog/2023/06/21/package-exports-support).
88

9-
1. add [`unstable_enablePackageExports`](https://metrobundler.dev/docs/configuration/#unstable_enablepackageexports-experimental) to your metro config (in `metro.config.js`). This field will default to `true` in a future version of RN so don't need to worry about it. This allows us to do some bundle size savings.
9+
2. add [`unstable_enablePackageExports`](https://metrobundler.dev/docs/configuration/#unstable_enablepackageexports-experimental) to your metro config (in `metro.config.js`). This field will default to `true` in a future version of RN so don't need to worry about it. This allows us to do some bundle size savings.
1010

1111
```js
1212
// if you use Expo:
@@ -24,9 +24,9 @@ const config = {
2424
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
2525
```
2626

27-
2. `yarn add react-navigation-header-buttons`
27+
3. `yarn add react-navigation-header-buttons`
2828

29-
3. Wrap your root component in a `HeaderButtons` Provider and pass the `stackType` prop (`'native' | 'js'`), as seen in [example's App.tsx](https://github.com/vonovak/react-navigation-header-buttons/blob/master/example/src/App.tsx).
29+
4. Wrap your root component in a `HeaderButtons` Provider and pass the `stackType` prop (`'native' | 'js'`), as seen in [example's App.tsx](https://github.com/vonovak/react-navigation-header-buttons/blob/master/example/src/App.tsx).
3030

3131
There are 3 providers to choose from. You'll get an actionable warning if you don't use the right one. They are:
3232

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,7 @@ You need to wrap your root component with a HeaderButtons Provider. `stackType`
251251

252252
Importing: `import { your_chosen_provider } from 'react-navigation-header-buttons/your_chosen_provider'`.
253253

254-
There are 3 providers to choose from. You'll get an actionable warning if you don't use the right one.
255-
256-
- `HeaderButtonsProvider` - the default, which assumes you will use `overflowMenuPressHandlerDropdownMenu` on Android but not iOS (because that's the default behavior that the library ships with).
257-
- `HeaderButtonsProviderPlain` - use it if you're not planning to use `overflowMenuPressHandlerDropdownMenu`. It will shave a few kB off your bundle and Hermes won't have to parse the code that would not run in the end.
258-
- `HeaderButtonsProviderDropdownMenu` - use it if you're planning to use `overflowMenuPressHandlerDropdownMenu` on all platforms.
254+
There are 3 providers to choose from. Read more in [Installation & Setup](INSTALL.md).
259255

260256
Optional `spaceAboveMenu` prop can be used to set the distance between the top of the screen and the top of the overflow menu when using `overflowMenuPressHandlerDropdownMenu`.
261257

0 commit comments

Comments
 (0)