So it sounds like you are torn between two hack fixes. Loading everything always seems more viable when data is the bare minimum and served from the same computer. Unless you are building a PWA and that is essential data, this is a lazy move, and you learn nothing.
You said these queries are supposed to fire on page change. Are the staying on the same page, but the id is changed, or are you changing pages completely?
How are you triggering the query?
Are you reloading because you only query when the component is created...
created() {
if (this.location) {
this.$apollo.queries.locationById.skip = true;
}
I just took a quick peek. Also, it might be better to use a getter to maintain your state.
Honestly, if you are new to vue and vuex, I would scaled down a bit. You will probably need help again, and that's page code length is going to be tough to jump into cold.
Thanks for the reply... it is a bit too late though ;)
I am now totally into GraphQL and Vue Apollo, where the queries are tightly coupled with the components which need them, and the Apollo Cache makes store and request control quite intuitive.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So it sounds like you are torn between two hack fixes. Loading everything always seems more viable when data is the bare minimum and served from the same computer. Unless you are building a PWA and that is essential data, this is a lazy move, and you learn nothing.
You said these queries are supposed to fire on page change. Are the staying on the same page, but the id is changed, or are you changing pages completely?
How are you triggering the query?
Are you reloading because you only query when the component is created...
I just took a quick peek. Also, it might be better to use a getter to maintain your state.
Honestly, if you are new to vue and vuex, I would scaled down a bit. You will probably need help again, and that's page code length is going to be tough to jump into cold.
Thanks for the reply... it is a bit too late though ;)
I am now totally into GraphQL and Vue Apollo, where the queries are tightly coupled with the components which need them, and the Apollo Cache makes store and request control quite intuitive.