Map through State Array (Loop) - React tutorial 8

  Рет қаралды 57,891

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 40
@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
@Infotainment-cb6cy
@Infotainment-cb6cy Ай бұрын
thanks for wasting my time
@Brad10
@Brad10 Жыл бұрын
Another thing you can do instead of generating a uuid is declaring an index on the map function such as: employees.map((employee, index) => { } This will give each object a key of the index of the array, which is really all you need to differentiate them.
@gift.albooms
@gift.albooms Жыл бұрын
it's bad solution in case of adding/removing Employees. The keys will be reassigned to neighboring elements.
@hananfadah
@hananfadah 8 ай бұрын
This tutorial is exactly what I was looking for. Thanks!
@drengrd
@drengrd Жыл бұрын
there are so many uploading in the KZbin and there explanation is not clear and the example can't be used in reality. But this give me the idea to resolve the problem I have in my project, and because of this map explanation and example the problem of my project have been resolved. Thank you for the sharing of knowledge.
@eliyahutarab4862
@eliyahutarab4862 2 жыл бұрын
Great tuturial man thank you for doing this (:
@Edutrul
@Edutrul 3 ай бұрын
Best part when it was all dark. Thanks for the tutorial.
@mariomeza3514
@mariomeza3514 Жыл бұрын
For me I put the array of data in a seperate file thats only meant for all this data, and put that in a variable. Then import that variable into whichever file your doing the map methoid in and use the variable instead. Its alot cleaner
@anirudhpv2473
@anirudhpv2473 Жыл бұрын
Thanks bro , it really helps.
@CC-kg6vs
@CC-kg6vs Жыл бұрын
awesome sauce video. subscribed
@madurangaweda86
@madurangaweda86 Жыл бұрын
I type the code and there are not define any errors instead of displaying one warning that "setEmployess variable not used", but when I run it on the web browser nothing will display, Is there anything or configuration before running this code? nevertheless, I would like to offer my gratitude and thanks for the effort that you are doing, It is really useful for a person who likes to learn these type of language techniques.
@ChristPages
@ChristPages 2 жыл бұрын
Great content
@petakirikiri4074
@petakirikiri4074 2 ай бұрын
Is there a way to wait for user interaction inside loops?
@sajutalk
@sajutalk Жыл бұрын
I used a big array to loop but still load while navigating menus 😢.
@MrValVet
@MrValVet 11 ай бұрын
Why are we using the Bootstrap modal when we already installed Tailwind?
@DrilonXhema
@DrilonXhema Жыл бұрын
would it look cleaner if we'd make a separate file for users then just making a searching filter in react and import it at our home file ?
@johanesalberto6136
@johanesalberto6136 7 ай бұрын
thanks
@orion6831
@orion6831 Жыл бұрын
thx
@AnthonyObi-wr6ro
@AnthonyObi-wr6ro 5 ай бұрын
what if you are using a data from the API .and is fetching correctly but giving you a type error
@yaredmekonnen3163
@yaredmekonnen3163 Жыл бұрын
I've seen what you did when the camera turned off😶‍🌫
@lucassu9099
@lucassu9099 8 ай бұрын
Hi, I am wondering what's your formatting extension? I like it when attributes move to new lines.
@codebreakthrough
@codebreakthrough 8 ай бұрын
I think it was prettier
@lucassu9099
@lucassu9099 8 ай бұрын
Thanks you so much.@@codebreakthrough
@tuxmusicman
@tuxmusicman Жыл бұрын
Hello, I am trying to put a dropdown inside of a menu depending on some text. I can't think of any other way to conditionally put the dropdown inside of a menu based on other variables.My issue is that I need to conditionally add a variable amount of links in a dropdown conditionally based on another array. I was trying to use map to add the links to the regular buttons for the nav, but I can't seem to conditionally put in the dropdown part.
@littlegirllost2654
@littlegirllost2654 Жыл бұрын
How would you have a list of data then have a user call and display that data to the screen?
@TheCuriousLifeOfCode
@TheCuriousLifeOfCode Жыл бұрын
@mileswalker766
@mileswalker766 Жыл бұрын
how does the reference 'employee' know that its a single version of 'employees' as you don't define employee as singular?
@jadeblade627
@jadeblade627 Жыл бұрын
it's a placeholder, you can call it anything you like and it will work. Similar to a for each loop.
@weexalatecorp
@weexalatecorp 6 ай бұрын
God bless Great resource
@jonldavis
@jonldavis Жыл бұрын
how do you get a local image instead of using one from a url? I had this working before we switched to the Array import jon from "./images/jon.jpg"; img={jon} but now when I add img in the array img: {jon} its not finding the picture
@kennyogbogu7777
@kennyogbogu7777 Жыл бұрын
Your "src" attribute should be shown like this... src = {jon} . Then at the top lines of your react file, you can import the image file like so... . import jon from ".../src/asset/jon.jpg"; . Make sure to add the image file extension.
@pirate.96
@pirate.96 5 ай бұрын
I need the css of this please
@davidbankys
@davidbankys Жыл бұрын
good
@ifeanyinnaemego
@ifeanyinnaemego 2 жыл бұрын
How do add the array in different file and use it in App js
@pastuh
@pastuh 2 жыл бұрын
Just export as simple javascript variable :)
@littlegirllost2654
@littlegirllost2654 Жыл бұрын
Place in components and use import export
@gh7136
@gh7136 5 ай бұрын
not showing us the Employee component makes this video useless
@ebrelus7687
@ebrelus7687 2 жыл бұрын
About generated uuid.
@scripteaze
@scripteaze 9 ай бұрын
nice
Create a Popup Modal with React Bootstrap - React Tutorial 9
6:00
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН
怎么能插队呢!#火影忍者 #佐助 #家庭
00:12
火影忍者一家
Рет қаралды 35 МЛН
Learn React #5: Maps and Loops in JSX
13:56
Anthony Sistilli
Рет қаралды 55 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 251 М.
I Asked LinkedIn Software Engineers How To Get Hired
10:49
Namanh Kapur
Рет қаралды 250 М.
React State Array of Objects
20:55
Sam Meech-Ward
Рет қаралды 26 М.
Introduction to System Design - MVC and Three-Tier Architecture
22:51
All useEffect Mistakes Every Junior React Developer Makes
22:23
React visually explained: 'use client'
15:57
Delba
Рет қаралды 52 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 722 М.
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН