Saving Form Edits
We'll cover the following...
We can now edit a draft item, but when we click “Stop Editing”, the original item is still unchanged. We need to overwrite the values in the original entry with the updated values in the draft entry.
Updating Existing Models
Earlier, we wrote a function called copyEntity
, which serializes the requested model (and its relations) to plain JS objects, and recreates them in the draft slice. We now need to ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy