5 Ways to Fetch Data from an API in Vue 3 Composition API

5 Ways to Fetch Data from an API in Vue 3 Composition API

Justin Brooks

3 года назад

70,879 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Rafael Gramoschi
Rafael Gramoschi - 29.08.2023 19:17

when you check "!config.skip && fetch()" you must "!config.skip && AWAIT fetch()"

Ответить
Junaid Jahan
Junaid Jahan - 21.05.2023 00:51

Awesome

Ответить
RAN AVITAL
RAN AVITAL - 08.05.2023 01:15

Please show examples 🙏

Ответить
Markus
Markus - 15.04.2023 21:33

Awful explanation, for useFetch you just copy-pace useAsyncState source code function from VueUse. What did you explaine? The case when author does not understand what he actually says

Ответить
Sy D
Sy D - 12.09.2022 23:45

It's probably overkill for just a basic fetch but that last function is really cool. I had to pause screen to copy it :p

Ответить
Colin Richardson
Colin Richardson - 08.09.2022 13:06

I didn't think you could use 'reactive' outside of the 'use' function because it had the potential to be initialised before the Vue instance had been configured?

Ответить
Ju
Ju - 01.08.2022 14:50

I m watching a lot of these video but I still can’t understand how should I do to connect vue and axios with my msql database :(

Ответить
Zekariyas Mulugeta Altaye
Zekariyas Mulugeta Altaye - 25.07.2022 12:24

this video just saved my ass from a lot of trouble, Literally. Thank you

Ответить
Marc de Ruyter
Marc de Ruyter - 20.07.2022 10:55

This only confuses matters

Ответить
Paws
Paws - 06.06.2022 11:32

Many thanks to Justin!

Ответить
fifty
fifty - 02.05.2022 07:17

the composition api is miles ahead of react hooks, they really nailed it with this types and functions

Ответить
Rafli Surya P
Rafli Surya P - 04.04.2022 17:42

can you explain how to use the method created in last section? because when I call it on component it will return Computedrefimpl

Ответить
Nihilius
Nihilius - 09.03.2022 15:47

please without music

Ответить
LeLeTesoro
LeLeTesoro - 01.03.2022 20:52

This video is like, "Info for beginners, beginners, beginners, dissertation for 2nd PhD in computer science, The End"

Ответить
Emo Nymph
Emo Nymph - 09.02.2022 08:49

Should have made video longer and shown examples of how it works by grabbing X from front end and storing it in DB at backend so we can visualize each method and select what we prefer syntaxically. You should also mention which fetching methods are compatible with web components and which are not, make a table (consider it as feedback)

Ответить
Ferhat Sunay Cansev
Ferhat Sunay Cansev - 04.02.2022 22:53

useFetch example is very very very great thanks alot man! love from Turkey!

Ответить
Pierre
Pierre - 03.01.2022 18:53

what is that ref() stuff?

Ответить
Ricko
Ricko - 03.10.2021 10:46

gold

Ответить
2603bex
2603bex - 02.10.2021 10:02

Brilliant! Thank you

Ответить
Parog Parog
Parog Parog - 11.08.2021 20:11

Very concise and to the point. I don't subscribe to channels very often, but the format and depth for the different possibilities you bring up are exactly the type of content an experience dev is looking for. :) Thanks!

Ответить
Carlos Alvarado
Carlos Alvarado - 10.08.2021 01:55

I was trying the sample code that you provide the get method is OK but how can I create a post request :v

Ответить
Maine
Maine - 02.08.2021 23:14

Great explanation with great visuals, a calming voice to listen to and exciting but understating music, I loved it! Got a new sub m8 ☺️

Ответить
Avi Koenig
Avi Koenig - 08.07.2021 02:40

Its always good practice to add a repo or gist link to the code used in the presentation.

Great demo,first time I see use of cache logic and the map use is very cool.

Ответить
Marvin
Marvin - 06.06.2021 13:29

damn.. this is so awesome

Ответить
Gagik Navasatariyan
Gagik Navasatariyan - 05.05.2021 23:50

Hi, Great content Thanks!

Ответить
Vadim Tomashevsky
Vadim Tomashevsky - 03.05.2021 22:09

Can you make a vue-i18n@next with routing video ?

Ответить
D K
D K - 01.05.2021 12:26

Please make guide how to create a pagination.

Ответить
Enderson Vizcaino
Enderson Vizcaino - 30.04.2021 22:32

Nice!!

Ответить
E E
E E - 27.04.2021 12:30

Very fireship-y))

Ответить
The one
The one - 27.04.2021 11:58

Great video as always Justin. Please create a Vue 3 course and take my money!

Ответить
Wilker Soh
Wilker Soh - 27.04.2021 06:11

Thanks for sharing, do you have real example to use the useFetchCache hook? i tried it doesn't really work correctly. Hope you can share more about it.

Ответить
epiiiiiiiiiiii
epiiiiiiiiiiii - 27.04.2021 05:08

Good stuff. I just wish you were using the Options API until I catch up. 😜

Ответить
Javier Ntaca
Javier Ntaca - 27.04.2021 04:40

Thanks !
Very useful .

Ответить
Tater Of Tots
Tater Of Tots - 26.04.2021 20:19

Nice one. I'm actually in my first Vue 3 production project right now. I don't actually need any API calls for this one but still good to know

Ответить
Sivasankaran T
Sivasankaran T - 26.04.2021 16:03

Justin thanks man

Ответить
RianY2K
RianY2K - 26.04.2021 16:02

thanks for tutorial. Vue JS 3 looks good in Syntax and API

Ответить