I have a parent component that passes in an error
as a prop.
Inside my child component I want to modify the error
prop. This is not allowed.
So, I can create a local copy…
const error = props.error;
But when the parent updates error
the child does not receive the update in the local var.
How to address this.
Note, I wish to create a copy in the child component so I can modify it in the child component.