Article content is one step behind #1

已關閉
theolem2020-10-19 14:18:32 +00:00建立 · 1 comment
管理員

#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.
Author
管理員

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()`
登入 才能加入這對話。
未選擇標籤
未選擇里程碑
No Assignees
1 參與者
訊息
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: theolem/md-parser#1
No description provided.