If I correctly understood you basically want to copy user.name prop to some variable such that future updates to props.user.name are ignored by that variable. In such case you must copy that props to a state variable:
// inside Edit
const [previousName, setPreviousName] = useState(props.user.name); // You could also use useRef instead
This way previousName will get initialized with props.user.name when that component mounts for the first time. Further updates to props.user.name will be ignored by this state variable.
Only if you unmount the Edit component and mount again, then it will copy the props.user.name again into previousName.
PS Alternatively you can use useRef instead of useState in my example