1
1
Fork 0

Article content is one step behind #1

Geschlossen
2020-10-19 14:18:32 +00:00 von theolem geöffnet · 1 Kommentar
Besitzer

#What's expected to happen
When clicking on "Edit" for an article, the meta AND content should be the ones fetched from the API.

#What happens
The article content in the UserInput component is the one from one step behind, suggesting that the Vuex state is not updated properly.

#What's expected to happen When clicking on "Edit" for an article, the meta AND content should be the ones fetched from the API. #What happens The article content in the `UserInput` component is the one from one step behind, suggesting that the Vuex state is not updated properly.
Autor
Besitzer

Possible explanation : the component is mounted before the Vuex mutation.

Hence the following behavior :

  1. the user clicks on "edit"
  2. the mutation is commited by the EditPage component
  3. the UserInputPage component is loaded, with the unmutated state
  4. the mutation is achieved, but not taken into account by the UserInputPage component.

Solution : await the mutation before calling router.push()

**Possible explanation** : the component is _mounted_ before the Vuex mutation. Hence the following behavior : 1. the user clicks on "edit" 2. the mutation is commited by the `EditPage` component 3. the `UserInputPage` component is loaded, with the unmutated state 4. the mutation is achieved, but not taken into account by the UserInputPage component. **Solution** : `await` the mutation before calling `router.push()`
theolem hat diesen Issue 2020-10-19 14:46:40 +00:00 geschlossen
Anmelden, um an der Diskussion teilzunehmen.
Kein Label
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Nachrichten
Fällig am
Das Fälligkeitsdatum ist ungültig oder außerhalb des zulässigen Bereichs. Bitte verwende das Format „jjjj-mm-tt“.

Kein Fälligkeitsdatum gesetzt.

Abhängigkeiten

Keine Abhängigkeiten gesetzt.

Referenz: theolem/md-parser#1
Keine Beschreibung angegeben.