type UseUserData = {}
const CurrentUserContext = React.createContext<UseUserData>([]);
const [userData, setUserData] = useState<UserType[]>([]);
useEffect(() => {
api.userData().then((jes) => setUserData([...userData, ...jes]))
}, [])
<CurrentUserContext.Provider value={[userData, setUserData]}>
</CurrentUserContext.Provider>
const [userData, setUserData] = useContext(CurrentUserContext) // Здесь ошибка