My Codes:
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import { createDrawerNavigator} from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';
import StockRoom from './StockRoom';
const Drawer = createDrawerNavigator();
function Refill(navigation: any): React.JSX.Element {
interface CustomAlertProps {
show: boolean;
onClose: () => void;
}
return (
<NavigationContainer independent={true}>
<Drawer.Navigator>
<Drawer.Screen name="Home" component={StockRoom} />
</Drawer.Navigator>
</NavigationContainer>
);
}
export default Refill;
I need to create a simple drawer but i can't. How can i solve this two problem? I tried npm uninstall and download all packages again but doesn't work.
Add this inside the your babel.config.js
:
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: ['react-native-reanimated/plugin']
};
After reconfiguring babel:
yarn start --reset-cache