How to implement edit via vuex?

Hello.

Page functionality as the medium, the ability to add/delete/edit posts, add new post is made on the create page, post, work, and everything works through vuex how to make to pass from the array of posts need a post on the edit-post edited and saved.
April 19th 20 at 12:09
2 answers
April 19th 20 at 12:11
Solution
Elegantly - ardith commented on April 19th 20 at 12:14
April 19th 20 at 12:13
Solution
Pass this page id post
It retrieves the data of the post for this id from vuex and clones them in the local as
While maintaining local state comitissa in vuex
Don't understand how to pass on the page id, use the router vue, but such a record
this.$router.push({ name: 'edit', params: { id: '1' } })
for the transition produces a Route with name 'edit' does not exist - Cordell.Wiza commented on April 19th 20 at 12:16
@Cordell.Wiza, without config of the router do not say what the problem is with this:
gives Route with name 'edit' does not exist
- oswaldo73 commented on April 19th 20 at 12:19

Find more questions by tags Vue.js