Javascript 警告:失败的道具类型:为'j'提供的道具'children'无效`

Javascript 警告:失败的道具类型:为'j'提供的道具'children'无效`,javascript,reactjs,frontend,react-proptypes,Javascript,Reactjs,Frontend,React Proptypes,我得到这个错误: index.js:1375警告:失败的道具类型:提供给j的无效道具children in j (at HomePage.jsx:15) in HomePage (created by Context.Consumer) in Route (at App.jsx:17) in App (at src/index.js:13) in Router (created by BrowserRouter) in BrowserRouter (at src/index.js:12) 我在

我得到这个错误:

index.js:1375警告:失败的道具类型:提供给
j
的无效道具
children

in j (at HomePage.jsx:15)
in HomePage (created by Context.Consumer)
in Route (at App.jsx:17)
in App (at src/index.js:13)
in Router (created by BrowserRouter)
in BrowserRouter (at src/index.js:12)
我在我的应用程序中使用了一个外部组件,它是从github获得的,可以在后台渲染视频。这里是链接。

它与proptypes有关,但由于它的遗留和react建议使用flo,所以我根本不使用类型检查

import React from "react";
import {
Container,
Header,
Image,
Button,
Icon
} from "semantic-ui-react";
import VideoBg from 'reactjs-videobg';
import mp4 from '../../video/hack4.mp4';

const HomePage = ({history}) => {
 return (
  <div className='masthead'>
  <VideoBg loop={true}>
    <VideoBg.Source src={mp4} type='video/mp4' />
  </VideoBg>
    <Container text textAlign='center'>
      <Header as='h1' inverted>
        <Image
          size='massive'
          src='/assets/logo.png'
          alt='logo'
          style={{ marginBottom: 12 }}
        />
        CodeUp
      </Header>
      <Button onClick={() => history.push('/events')} size='huge' 
      inverted>
        Enter
        <Icon name='right arrow' inverted />
      </Button>
    </Container>
</div>
);
};
从“React”导入React;
进口{
容器
标题,
形象
按钮
偶像
}从“语义用户界面反应”;
从“reactjs VideoBg”导入VideoBg;
从“../../video/hack4.mp4”导入mp4;
const主页=({history})=>{
返回(
编码
history.push('/events')}size='巨人'
倒置>
进来
);
};

这应该是一个评论,但需要更多的声誉

我有时发现调试和响应非常棘手。在你的代码中似乎没有任何叫做j的东西

我确实在这段代码中看到了一件事——不起作用,您需要text={true}
,请参见上文
jsx标记属性实际上是jsx(Javascript)对象,因此它不能处理像
text
这样的东西。所以你必须给它一个提示,它是一个布尔值


这可能是问题所在,也可能不是问题所在

这应该是一个评论,但需要更多的声誉

我有时发现调试和响应非常棘手。在你的代码中似乎没有任何叫做j的东西

我确实在这段代码中看到了一件事——不起作用,您需要text={true}
,请参见上文
jsx标记属性实际上是jsx(Javascript)对象,因此它不能处理像
text
这样的东西。所以你必须给它一个提示,它是一个布尔值


这可能是问题所在,也可能不是问题所在

children是VideoBg组件中用于向其添加视频源的道具


我在lib repo上提出了一个问题,以进一步调查

儿童是VideoBg组件中用于添加视频源的道具


我提出了一个关于lib回购的问题,以进一步调查

添加到发行的链接此处是发行链接:添加到发行的链接此处是发行链接: