我正在构建一个组件库,我需要其中的一些组件有一个可定制的标记名。例如,有时看起来像<button>的东西实际上是<a>。<Button> 我们可能还需要传递一个自定义组件: // Doesn't throw an error because RouterLink has a "to" prop
<Button as={RouterLink</Button> 下面是不带
我使用react.js已经有一段时间了。最近,我开始看到一个错误,比如:
Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes'我不知道怎么回事。我用谷歌搜索了一下,我发现别人说的是props的问题。这是我看到的一个场景。你能给我一个详细的答案,为什么会发生