I'm new to react and been struggling to figure out how to render the components inside the container depending on which button has been clicked.
I've set the state to false, then on the button click set it to true then used a ternary operator to show or set the component to null but won't work when the next button is clicked because the state is already set to true.
any help in the right direction would be appreciated :)
const AboutUs = () => {
const [VisDetails, setVisDetails] = useState(false);
return (
<Button>Personal Details</Button>
<Button>Bio</Button>
<Button>Qualifications</Button>
Container className={classes.container}>
<PersonalDetails />
<ProfileBio />
<ProfileQualifications />
</Container>
);
};