diff --git a/README.md b/README.md index 615c4d3..0c15822 100644 --- a/README.md +++ b/README.md @@ -31,24 +31,22 @@ import { View, Button, Text } from 'react-native'; import MonthPicker from 'react-native-month-year-picker'; const App = () => { + const [date, setDate] = useState(new Date()); - const [show, setShow] = useState(false); - const [date, setDate] = useState(); - - const toggleMonthPicker = () => setShow(!show); - - const onValueChange = (event, value) => setDate(value); + const onValueChange = (event, newDate) => setDate(newDate); return ( - -