How to build a load more button with Vue.js and #graphql
▻https://hackernoon.com/how-to-build-a-load-more-button-with-vue-js-and-graphql-5e6de1b61a6b?sou
While I was working on ? Colour Hunt I had to implement pagination at some point. No one wants to load a ton of color palettes at once. However I really like the lazy load approach instead of a classic pagination.? PreparationColour Hunt is build with Nuxt.js, Graph.cool and vue-apollo. The stack is a dream for rapid development as you don’t need to fiddle around with a backend. The idea behind Colour Hunt is, that people can create and share color palettes. However you can use this techniques for all kind of graphql nodes. Most examples are using the good old Blog example and posts.So let’s take a look at our GraphQL query:Colour Hunt example queryLets say we have a simple query like this. Just query all palettes that are available and order them by a variable. And our vue component would (...)
#javascript #vuejs #front-end-development #build-a-load-more-button