const [dirty, setDirty] = React.useState(false);
In another component I have:
const AddItemForm = ({ setAddItem, addItem, dirty }) => {
I am trying to update dirty (when the form is changed) via:
So I can use this changed state in my other component - but how do you change the state as when I use setDirty it isn't available.
0 comments:
Post a Comment
Thanks