Answers for "Property '<stateFunction>' does not exist on type 'Dispatch<SetStateAction<string>>'."

0

Property '<stateFunction>' does not exist on type 'Dispatch<SetStateAction<string>>'.

// When error
({setMessages}: React.Dispatch<React.SetStateAction<Array<Message>>>)
// You can delete "{" and "}"
(setMessages: React.Dispatch<React.SetStateAction<Array<Message>>>)
Posted by: Guest on April-11-2022

Code answers related to "Property '<stateFunction>' does not exist on type 'Dispatch<SetStateAction<string>>'."

Code answers related to "Javascript"

Browse Popular Code Answers by Language