Turbo Tutorial | Nuxt 3: Query from an external API + read more

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Learn how to query an external API and how to implement "read more" functionality.
    Find the code for this tutorial here: github.com/Tur...
    Visit turbo-tutorial... for more info.
    Browse more tutorials here: turbo-tutorial...

КОМЕНТАРІ • 6

  • @dCoder92
    @dCoder92 Рік тому +1

    Great work, those turbo tuts really helping me to learn nuxt, resources for nuxt 3 are limited...

  • @lucasthorbecke6563
    @lucasthorbecke6563 Рік тому

    Hi! Thanks for this! How can i avoid doing the reload of data when navigating back to such a list component. For example if you had a detail page for each talk to at eg. /talks/{id} and then you hit the back button to list the talks, it reloads again with limit 2 right? I have a case where i want to load paginated data based on a filter with a details page to each element. Unfortunately all filters and data is reset after returning from the details page. Do i have to use external state management libs for this already?

    • @timbenniks
      @timbenniks  Рік тому +1

      In Nuxt 3 you can add a key as cache to your data fetch call. When you go back to the list page Nuxt should render the talks from the cache.

    • @lucasthorbecke5370
      @lucasthorbecke5370 Рік тому +2

      @@timbenniks Thanks for the response! Hmm but the filter refs always seem to reset when navigating back thus triggering a reload because i am watching the filters. I seem to have some fundamental gaps of understanding the whole framework... how can i keep ref values persist through route navigation. I tried keepalive on the page meta info but that does not seem to do it.

    • @timbenniks
      @timbenniks  Рік тому +1

      Interesting. Reach out on Twitter at @timbenniks, I’ll put you in touch with Nuxt core team members.

  • @i_am_a_real_cat1443
    @i_am_a_real_cat1443 Рік тому

    how can i sort this data?