Created
December 18, 2020 23:46
-
-
Save lmiller1990/4889bf2b4378dc0aa9bfe2efdbd5bbda to your computer and use it in GitHub Desktop.
thoughts.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am hesitant to tell people how to org their business logic because I don't know about the business. | |
I would keep vuex actions simple. | |
import businessLogic from './business-logic.js' | |
actions = { | |
getData({ state, commit }) { | |
const userStatus = await axios.get('/api/user_status') | |
const processedStatus = complexBusinessLogic.processUserStatus({ status: state.user.status, data: res.data }) | |
commit('UPDATE_USER', processedStatus) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment