In order to be able to book parking in a specific zone, the user must first add their own vehicles. This lesson will focus on implementing the first CRUD operation.
And the form to add a vehicle will look like this. After pressing the Save Vehicle
button form is submitted to the server and then redirected back to the list. Pressing the Cancel
button redirect will discard the form data without submitting it and will redirect back to the list.
- Create a new
src/hooks/useVehicle.jsx
hook...