Skip to content

bdrtsky/nuxt-dev-to-clone

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dev.to clone built with NuxtJS

An articles aggregation app using DEV.TO public API, demonstrating capabilities of NuxtJS new fetch()

See live mode.

Edit dev-to-clone-nuxt

What You’ll Learn

  • use $fetchState for showing nice placeholders while data is fetching on the client side

  • use keep-alive and activated hook to efficiently cache API requests on pages that have already been visited

  • reuse the fetch hook with this.$fetch()

  • set fetchOnServer value to control when we need to render our data on the server side or not

  • find a way to handle errors from fetch hook.

Getting Started

# clone the project
git clone https://github.com/bdrtsky/nuxt-dev-to-clone.git

# install dependencies
npm install

# start the project
npm run dev

# go to http://localhost:3000

Read full article: https://nuxtjs.org/blog/build-dev-to-clone-with-nuxt-new-fetch