At fist my code looked like this this
const customerInputHandler = (currentCustomer) => { setCustomer(currentCustomer.nativeEvent.text); };
And after searching the internet I came on a solution and I implemented this code below.I've being searching around to try and understand this code but unable to.Could some please explain the error I had above & explain why this solution fixed everything
const customerInputHandler = (currentCustomer: { nativeEvent: {text: React.SetStateAction<string>}; }) => { setCustomer(currentCustomer.nativeEvent.text);};