Fetch an API to Display on Page - React Tutorial 22

  Рет қаралды 23,158

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 18
@codebreakthrough
@codebreakthrough 2 жыл бұрын
⚛ FREE React Course (download & bonus content) - calcur.tech/free-react-course React KZbin Playlist - calcur.tech/react-playlist Code - github.com/CalebCurry/react
@keithrfield
@keithrfield 11 ай бұрын
This series is exceptional. You have a great way of explaining and illustrating complex concepts. And I appreciate your sense of humor.
@metasal
@metasal 2 жыл бұрын
I wrote my first React Component using useState, useEffect and Fetch. Thank you Caleb.
@TheCacoVenom
@TheCacoVenom 2 жыл бұрын
I have people using async on fecth, do you a have a video about fecth that explain differents way of using them
@laxlyfters8695
@laxlyfters8695 2 жыл бұрын
Also just a FYI I have definitely seen some frontend developer interviews where u are asked to make a fetch request and render some data in the frontend and make a little cool site.
@eliyahutarab4862
@eliyahutarab4862 2 жыл бұрын
Please make a video on how to build complex api with the mern stack
@spanac76ks
@spanac76ks 2 жыл бұрын
You’re back
@eliyahutarab4862
@eliyahutarab4862 2 жыл бұрын
And you can also create .env file in the frontend and just get the information of the kry from there and that way no one can get their hands on that
@cannonkalra
@cannonkalra 11 ай бұрын
there is nothing secret on the frontend, browser has all the code, the object where you load the key from the .env file
@MrValVet
@MrValVet 7 ай бұрын
lol 'it's going to be ugly but you're already seeing me'
@cyriacus73
@cyriacus73 Жыл бұрын
👍
@spanac76ks
@spanac76ks 2 жыл бұрын
Yay
@spanac76ks
@spanac76ks 2 жыл бұрын
👩‍👩‍👧‍👧👨‍👩‍👧‍👧👨‍👩‍👧👨‍👩‍👧👨‍👨‍👧‍👧
@bugrakarabudak7135
@bugrakarabudak7135 2 жыл бұрын
i am first
@rl6382
@rl6382 Жыл бұрын
return ( Here is an example of a random definition : {word.map((meaning) => { return {meaning.defintions[0].definition} })} ); does not work for me, I get an error of undefined reading, It;s because the API call data hasnt been set to word yet? how is yours working?
@rl6382
@rl6382 Жыл бұрын
I fixed it by adding an empty arry to the useState method call like so =useState = ([]); and the error fixed. Why is this not an issue for you?
@rl6382
@rl6382 Жыл бұрын
I think I may have solved this.. but not entirely sure, let me know what you think, So i believe I was getting an error and had to provide the array [] syntax as a param to useState() because my PC is processing the return code block faster than the API can respond, so it gave me an undefined error until I added that []. What is your opinion. I am still learning but this is how i can imagine in the background it fixed
@lfc5times130
@lfc5times130 Жыл бұрын
Add dependency array and if you are getting undefined reading map error, try something like this {word && word.map(()) => so on... sometimes if there's no data in the api, you will get this map error. Trying adding word && word.map. It will work.
URL Parameters in Router - React Tutorial 23
4:39
Caleb Curry
Рет қаралды 8 М.
ReactJS Course [7] - How To Fetch Data From an API in React
30:20
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Consume an API in React (useEffect, useState, fetch)
21:07
Caleb Curry
Рет қаралды 24 М.
PostgreSQL Introduction - Beginner Crash Course
18:00
Caleb Curry
Рет қаралды 7 М.
Fetching Data in React - Complete Tutorial
29:10
Cosden Solutions
Рет қаралды 153 М.
Learn Fetch API In 6 Minutes
6:35
Web Dev Simplified
Рет қаралды 1,3 МЛН
4 Ways To Fetch Data in React
31:17
PedroTech
Рет қаралды 57 М.
Coding a FULL App with AI (You Won't Believe This)
15:19
Creator Magic
Рет қаралды 359 М.
How to FETCH data from an API using JavaScript ↩️
14:17
Bro Code
Рет қаралды 176 М.