how to make state true in one component when clicked an others to be false react code example
Example: toggle boolean state react
this.setState(prevState => ({
check: !prevState.check
}));
this.setState(prevState => ({
check: !prevState.check
}));