Context: nuxt generate
On initial page load, fetch() will be called once. created() will be called twice(once on server, once on page load)
fetch()
is used only to get static data
Before using fetch(), identify which piece of data is static(changes rarely) & which is dynamic(will change frequently).
For example, in the case of a blog, title, blog content are static & comments are dynamic.fetch has access to both store & data()
Top comments (0)