I only want a particular div
to display if showHideClassName
is set to the value of true
. I have this code in my React application so that a div will either display or not depending on the status of showHideClassName
:
render() {
...
const showHideClassName = showPrompt ? 'show-div' : 'display-none';
return (
<div className={showHideClassName}>
...
</div>
);
}
The div is always visible though. Is there any way I can get this to work as I desire?