728x90
반응형
에러
Error: Couldn't find a 'component', 'getComponent' or 'children' prop for the screen 'ChannelCreation'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.
해결 방안
문제 코드
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { ChannelList, Profile } from "../screens";
const Tab = createBottomTabNavigator();
const Home = () => {
return (
<Tab.Navigator>
<Tab.Screen name="List" compoent={ChannelList} />
<Tab.Screen name="Profile" compoent={Profile} />
</Tab.Navigator>
);
};
export default Home;
변경 코드
오타 수정 compoent -> component
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { ChannelList, Profile } from "../screens";
const Tab = createBottomTabNavigator();
const Home = () => {
return (
<Tab.Navigator>
<Tab.Screen name="List" component={ChannelList} />
<Tab.Screen name="Profile" component={Profile} />
</Tab.Navigator>
);
};
export default Home;
그 외 참고자료
1.
2.
https://www.inflearn.com/questions/313883/react-navigation-%EC%85%8B%EC%97%85-%EC%98%A4%EB%A5%98
728x90
반응형