My goal: Click a button in a child component and have that component removed.
New to React. In my app.js I have a component and a prop within that component:
<IntroSteps isHidden={false} />
In the <IntroSteps> component I have logic to listen for the isHidden Prop
export default function IntroSteps({isHidden}) {
if(isHidden) {
return null
}
return ( <div> content </div> )
}
My goal is to be able to update isHidden within the IntroSteps component. I've attempted the following with no luck. What is the correct way to do this?
const removeIntroSteps = () => {
isHidden = true
};