Import React, {useState}from ‘react’;
.
.
.
Const example:React.FC =() =>{
Const { text , setText }= useState ();
Return(
…
<IonTextarea placeholder value={ text} onIonChange={e => setText ( e.detail.value!)}>
);
}
I followed exactly what is said in ionicframework’s official docs but i get the error as
Property ‘text’ doesn’t exist on type ‘[string | undefined, Dispatch<SetStateAction>]’
Property ‘setText’ doesn’t exist on type ‘[string | undefined, Dispatch<SetStateAction>]’
1 post - 1 participant