I would like sectionOne to be able to call another component but I dont seem to be getting it right. Basically below is an example of what I am trying to do. Any help would be nice. thx
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,
};