diff --git a/my-project/components/addTodo.js b/my-project/components/addTodo.js index e0e5eab..73542dc 100644 --- a/my-project/components/addTodo.js +++ b/my-project/components/addTodo.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { StyleSheet, View, TextInput, Button } from 'react-native'; export default function AddTodo({ submitHandler }) { - [text, setText] = useState(''); + const [text, setText] = useState(''); const changeHandler = (val) => { setText(val); @@ -34,4 +34,4 @@ const styles = StyleSheet.create({ borderBottomWidth: 1, borderBottomColor: '#ddd', }, -}); \ No newline at end of file +});