I have a search function; it takes react.hooks as the first argument, and I don’t know which type is in X. It seems to be equal to Dispatch. Is there any other way to set the type of X? Codesandbox code

import React, { FC, Fragment, Dispatch,SetStateAction } from 'react' const SearchText:FC<{X:Dispatch<SetStateAction<string>>,Y:string}> = ({X,Y}) => { console.log(Y) return ( <Fragment> <input type={'text'} size={50} maxLength={150} placeholder={'Search for anything'} alt={'search'} spellCheck={false} autoComplete={'off'} value={Y} onChange={({ target }) => {X(target.value);}} /> <input type={'submit'} value={'search'} /> </Fragment> ) }; 

    0