Skip to content

Commit 33acdb9

Browse files
committed
Add troubleshooting section to README
1 parent 907355f commit 33acdb9

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

packages/bottom-navigation/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,20 @@ export function BottomNavigation() {
279279
}
280280
```
281281

282+
**Troubleshooting**
283+
284+
If you see an error like this when writing e.g. `<bottomNavigation>` into your JSX:
285+
286+
> Property 'bottomNavigation' does not exist on type 'JSX.IntrinsicElements'.ts(2339)
287+
288+
Make sure that you have:
289+
290+
1. Installed the `react-nativescript` npm module.
291+
2. Installed the `@types/react` npm module, strictly with the exact version provided in the [React NativeScript starter template](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-blank-react).
292+
3. Run the postinstall script that comes with the React NativeScript template – `npm run postinstall` – to patch `@types/react`.
293+
4. Registered the component as described above (i.e. import and run the `registerBottomNavigation()` method).
294+
5. If using Visual Studio Code, option-click the import `@nativescript-community/ui-material-bottom-navigation/react` to jump to the file; opening the file will force it to load its provided typings.
295+
282296
## API
283297

284298
### Attributes

packages/tabs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,20 @@ export function Tabs() {
279279
}
280280
```
281281

282+
**Troubleshooting**
283+
284+
If you see an error like this when writing e.g. `<tabs>` into your JSX:
285+
286+
> Property 'tabs' does not exist on type 'JSX.IntrinsicElements'.ts(2339)
287+
288+
Make sure that you have:
289+
290+
1. Installed the `react-nativescript` npm module.
291+
2. Installed the `@types/react` npm module, strictly with the exact version provided in the [React NativeScript starter template](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-blank-react).
292+
3. Run the postinstall script that comes with the React NativeScript template – `npm run postinstall` – to patch `@types/react`.
293+
4. Registered the component as described above (i.e. import and run the `registerTabs()` method).
294+
5. If using Visual Studio Code, option-click the import `@nativescript-community/ui-material-tabs/react` to jump to the file; opening the file will force it to load its provided typings.
295+
282296
## API
283297

284298
### Attributes

0 commit comments

Comments
 (0)