【发布时间】:2021-09-21 19:28:34
【问题描述】:
我希望 sectionOne 能够调用另一个组件,但我似乎没有做对。基本上下面是我正在尝试做的一个例子。你能帮忙的话,我会很高兴。谢谢
const element = (
<div label="go Back">
<Home />
</div>
);
export const appTabBarQueues = {
sectionOne: {element},
sectionTwo: 'Section Two',
sectionThree: 'Section Three',
sectionFour: 'Section Four',
sectionFive: 'Section Five'
};
//drawer.js
import React from 'react';
import PropTypes from 'prop-types';
export const DrawerSection = props => {
const {sectionOne} = props;
return (
<>
<div>{sectionOne}</div>
</>
);
};
DrawerSection.propTypes = {
sectionOne: PropTypes.any,
};
【问题讨论】:
标签: javascript reactjs rxjs react-router react-hooks