i try to do hide/show in react I took the code from the internet. But I probably put it in the wrong place. please help
my code https://codesandbox.io/live/4e62cd7f12d
where I took the code https://dirask.com/posts/React-how-to-show-or-hide-element-jvorZ1
you've declared the visible variable inside the lis subcomponent/function but used in the main component.
You need to define the visible variable in the main component.