VueJS CRUD: Edit Product Page
The Edit Product Page will be used to allow a user to edit a specific product. This needs to work off a URL like /product/edit/:id with :id being the product ID in the database.
This component needs two data points, one to store the data for the product and the other to store the notification messages from the form.
Get The Product
On the created lifecycle hook of Vue the component will need to fetch the product data with this ID.
We then create the method getProduct to lookup the product by the route parameter ID and store . . .
Subscribe To Newsletter
Get weekly updates to your email