New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attempt child is not RNScreen type with React Navigation v6.0 #1608
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
I get the same error after upgrading from 3.17.0 to 3.18.0 |
hi, i am getting this error in version 3.18.0 of react-native-screens. Is there any solution? |
same problem |
3.17.0 same issue for me... |
I have the same issue on our new architecture sample app. Here is a code for repro. |
Ok, looks like I know what is going on. Autolinking was added with #1585 and it added Didn't catch it while testing cause I was using library version directly from I'll release new version with the fix soon. If you need the fix immediately just copy & paste this file into your |
Awesome! Thank you for the quick solution. @kkafar |
## Description Autolinking was added with #1585 and it added `react-native.config.js` file with codegen configuration, **but** it did not add this file to npm include list causing its absence in final released package... Fixes #1608 ## Changes Added `react-native.config.js` to npm file list in main `package.json` ## Test code and steps to reproduce See #1608 for reproductions. ## Checklist - [x] Ensured that CI passes
3.18.1 is available for download & should resolve the issue. Let me know (tag me) if something is still wrong). |
@kkafar Thank you so much for your update! My app ran successfully |
I am still facing the same issue. while using react-native-screens-3.20.0 App.js
MealsOverview.js
package.json
and I am facing the error - attempt attach child that is not of type RNscreens @kkafar please help me in solving this issue |
The same problem. But with most screens it works fine... would be great to understand the core of the problem... |
Hey if the issue still exists I would require a valid reproduction. Unless it is provided I can't do much (as I can not reproduce the issue). |
Description
Hi, I have install React Navigation v6 with all dependencies including RNScreen 3.18.0.
Enabling hermes and fabric also. But every time I create stack navigator using createNativeStackNavigator, it thrown an error said attempt child is not RNScreen type. How do I solved it? Thanks in advance
stack = createNativeStackNavigator()
const stackApp = () => {
return(
<StackApp.Navigator>
<StackApp.Screen name="Home" component={HomeScreen} />
</StackApp.Navigator>
)
}
Steps to reproduce
Snack or a link to a repository
https://gitlab.com/denix182/
import {createNativeStackNavigator} from '@react-navigation/stack';
import LoginScreen from '../../screens/Auth/login';
import RegisterScreen from '../../screens/Auth/register';
import ForgotScreen from '../../screens/Auth/forgot';
import MainScreen from '../../screens/Home/main';
import MainNavigation from '../TabNavigation/BottomNavigation';
const AuthStack = createNativeStackNavigator();
const MainStack = createNativeStackNavigator();
const RootStack = createNativeStackNavigator();
type AuthStackParams = {
Login: undefined;
Register: undefined;
ForgotPass: undefined;
};
type MainStackParams = {
Home: undefined;
};
function AuthStacking({route, navigation}: any) {
return (
<AuthStack.Navigator>
<AuthStack.Screen name="Login" component={LoginScreen} />
<AuthStack.Screen name="Register" component={RegisterScreen} />
<AuthStack.Screen name="ForgotPass" component={ForgotScreen} />
</AuthStack.Navigator>
);
}
function MainStacking({route, navigation}: any) {
return (
<MainStack.Navigator>
<MainStack.Screen name="Home" component={MainScreen} />
</MainStack.Navigator>
);
}
const RootStacking = () => {
return (
<RootStack.Navigator>
<RootStack.Screen
name="Authentication"
component={AuthStacking}
options={{headerShown: false}}
/>
<RootStack.Screen
name="MainApp"
component={MainNavigation}
options={{headerShown: false}}
/>
</RootStack.Navigator>
);
};
export {AuthStacking, MainStacking, RootStacking};
Screens version
3.18.0
React Native version
0.70.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Android 12
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: