Home

Issue: 1432

Question: difference between fetch and asyncData

[issue link]

Hi!

It is confusing when to use fetch and when asyncData

They both can:

  • access context (store, params)
  • both can be called from the server-side

If I understand correctly I should use fetch when I want to fill the store and asyncData when I want to set up component data.

But asyncData can access store too. So why there are these two methods?

This question is available on Nuxt.js community (#c1274)