Leanote's Blog
I love Leanote!
Toggle navigation
Leanote's Blog
Home
Chrome
Git
Linux
Windows
Others
工具大全
VsCode
Expo
Html
JavaScript
Npm
Node
Mock
React-Native
React
TypeScript
小程序
插件
正则
Dva
Ant-Design-React
Umi
Vue
Vux
Ant-Design-Vue
Http
Java
flutter
开发小工具
About Me
Archives
Tags
react forwardRef导致泛型丢失
2023-09-25 08:36:43
39
0
0
admin
```tsx const ForwardTable = React.forwardRef(InternalTable) as <RecordType extends object = any>( props: React.PropsWithChildren<TableProps<RecordType>> & { ref?: React.Ref<HTMLDivElement> }, ) => React.ReactElement; // 使用 <Table<{id: string, b: number}> /> ```
Pre:
联动滑动电梯
Next:
使用infer推断出React.Ref<T>里的T类型
0
likes
39
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.