TS2349 sth has no call signatures的一个非常常见的TypeScript错误。 在不同的情况下,它使用不同的解决方法来解决。但是处理react的上下文时,我发现最好的解决方案是使用// @ts-ignore。 请问,在这种情况下,正确的方法是什么?, useContext } from 'react
我得到了这个错误(还有其他错误): Type 'Dispatch<SetStateAction<null>>' is not assignable to type '() => void' 我基本上是这样做的:import React, { ReactNode, useRef, useContext,});
export functi