首页 > 解决方案 > 如何将 props 接管给其他组件?打字稿反应

问题描述

我的反应有问题。我应该如何在其他组件上使用道具?我想使用其他功能组件...


         export const MainComponent = (props: ImportantProps): JSX.Element => {
         return (
             <OtherComponent {...this.props} />
          );
          export default function OtherComponent(props: ImportantProps) {
          ///
          }

标签: reactjs

解决方案


推荐阅读