shirakaba / react-nativescript

React renderer for NativeScript
https://react-nativescript.netlify.com
MIT License
284 stars 14 forks source link

React NativeScript Navigation: No exported member 'NativeStackNavigationProp' #69

Closed heritiermwalila closed 3 years ago

heritiermwalila commented 4 years ago

`ERROR in components/FirstScreen.tsx:4:10 TS2305: Module '"../../node_modules/react-nativescript-navigation/dist"' has no exported member 'NativeStackNavigationProp'. 2 | import { RouteProp } from '@react-navigation/core'; 3 | import { Dialogs } from '@nativescript/core';

4 | import { NativeStackNavigationProp } from "react-nativescript-navigation"; | ^^^^^^^^^^^^^^^^^^^^^^^^^ 5 | import { MainStackParamList } from "./NavigationParamList"; 6 | 7 | type FirstScreenProps = {

ERROR in components/SecondScreen.tsx:3:10 TS2305: Module '"../../node_modules/react-nativescript-navigation/dist"' has no exported member 'NativeStackNavigationProp'. 1 | import * as React from "react"; 2 | import { RouteProp } from '@react-navigation/core';

3 | import { NativeStackNavigationProp } from "react-nativescript-navigation"; | ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | import { MainStackParamList } from "./NavigationParamList"; 5 | 6 | type SecondScreenProps = { `

shirakaba commented 4 years ago

Sorry about this – I’m still waiting for my PR to the RNS template, which fixes this, to be merged.

To fix this, just replace all usages of NativeStackNavigationProp with FrameNavigationProp. It was renamed in the last version of RNS Navigation.