我正在尝试添加一个firebase的谷歌登录功能。我正在使用react钩子和typescript。我似乎不能使用StyledFirebaseAuth模块。当我试图渲染它时,它给出了这个错误
JSX element type 'StyledFirebaseAuth' is not a constructor function for JSX elements.
Type 'StyledFirebaseAuth' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.我已尝试检查我的tsconfig是否有任何可能导致此问题的设置
这是我的导入
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth';
当我尝试渲染时
<StyledFirebaseAuth
uiConfig={uiConfig}
firebaseAuth={firebase.auth()}
/>我得到了这个错误
JSX element type 'StyledFirebaseAuth' is not a constructor function for JSX elements.
Type 'StyledFirebaseAuth' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.发布于 2019-06-20 12:44:12
我想明白了,谢谢。我所要做的就是删除我的包-lock.json
https://stackoverflow.com/questions/56678464
复制相似问题