I'm trying to get to learn hooks and react native in general.
Currently I'm trying to create a small shopping list app, where you'd add your desired item to the list.
I already have the input + button on the display.
<View>
<TextInput placeholder="hinzufügen..."
onChangeText={inputHandler}
value={enteredEntity}
/>
<Button title="+" onPress={addInputHandler} />
</View>
I have two functions + hook declared as the following:
const [enteredEntity, setEnteredEntity] = useState('');
const inputHandler = (enteredEntity) => {
setEnteredEntity(enteredEntity);
}
const addInputHandler = () => {
console.log(enteredEntity);
}
and get the following error message (see below) - at Line 20, where the error should be I have the TextInput.
Thank you very much for your input.

import React, { useState } from 'react'