I have an input of type checkout and I want to use firestore to get the default value and then put that value in the state and be able to change it and update the store. this is how I thought about it for now.
[visible,setVisible] = useState(false)
const data = commingFromFirebase();
return(
<div>
{
data.map(el => <input type="checkbox" defaultValue={el.visible} value={visible}
onChange={e => setVisible(!visible)}/>
}
</div>
)