Map through State Array (Loop) - React tutorial 8

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

Рекомендации по теме
Комментарии
Автор

Another thing you can do instead of generating a uuid is declaring an index on the map function such as: employees.map((employee, index) => { <Employee key={index} } /> } This will give each object a key of the index of the array, which is really all you need to differentiate them.

Brad
Автор

This tutorial is exactly what I was looking for. Thanks!

hananfadah
Автор

Best part when it was all dark. Thanks for the tutorial.

Edutrul
Автор

Great tuturial man thank you for doing this (:

eliyahutarab
Автор

there are so many uploading in the YouTube 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.

jilvirpaeste
Автор

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

mariomeza
Автор

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 ?

DrilonXhema
Автор

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.

tuxmusicman
Автор

How would you have a list of data then have a user call and display that data to the screen?

littlegirllost
Автор

I used a big array to loop but still load while navigating menus 😢.

sajutalk
Автор

Why are we using the Bootstrap modal when we already installed Tailwind?

MrValVet
Автор

what if you are using a data from the API .and is fetching correctly but giving you a type error

AnthonyObi-wrro
Автор

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.

madurangaweda
Автор

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

jonldavis
Автор

I've seen what you did when the camera turned off😶‍🌫

yaredmekonnen
Автор

Hi, I am wondering what's your formatting extension? I like it when attributes move to new lines.

lucassu
Автор

how does the reference 'employee' know that its a single version of 'employees' as you don't define employee as singular?

mileswalker
Автор

How do add the array in different file and use it in App js

ifeanyinnaemego
Автор

not showing us the Employee component makes this video useless

gh