react-polymorphic-types:React的零运行时多态组件定义

React多态类型React的零运行时多态组件定义动机作为的后继者,该项目以更少的开销提供了更准确。特征自动代码补全,基于as的值根据关联组件的推断道具进行静态类型检查HTML元素名称验证用法Heading组件可以证明多态性的有效性: < Heading xss=removed> Heading &lt; / Heading > < Heading xss=removed> Subheading &lt; / Heading>像上一个组件一样的自定义组件可以使用如下所示的包。 import type { PolymorphicPropsWithoutRef } from "react-polymorphic-types" ; // An HTML tag or a different React component can be rendered by
zip
react-polymorphic-types-main.zip 预估大小:15个文件
folder
react-polymorphic-types-main 文件夹
folder
empty.js 文件夹
file
package.json 948B
file
LICENSE 1KB
file
package-lock.json 1KB
file
tsconfig.json 268B
file
index.d.ts 1KB
file
.gitignore 38B
file
CHANGELOG.md 1KB
file
CODE_OF_CONDUCT.md 5KB
file
README.md 4KB
file
.editorconfig 216B
file
.gitattributes 19B
folder
.vscode 文件夹
file
settings.json 87B
file
extensions.json 80B
file
.prettierrc.json 165B
zip 文件大小:9.62KB