ReactJS list and keys #9 React Course

preview_player
Показать описание
ReactJS list and keys

Whenever we need to build a list of items, we usually have an array or an object. So in React we use the JavaScript map function in order to map the data from the array to elements on the screen.

🧿 I discussed:

✔️ How to use JavaScript map
✔️ How to render lists in React using map operator
✔️ What are keys in React
✔️ How to render lists directly in JSX

0:00 Intro
0:18 Mapping in JavaScript
0:44 Creating a list in React
1:30 React keys
2:25 Outro

************************************************************

************************************************************
👉 Linkedin:

👉 Discord:

👉 Portfolio:

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

01:38 You got the word "Identifier" correct there but the second time you write it there is a typo. Other than that great video, key is important for React to keep track of dynamic elements. This is an informative video. I like your content

samettt
Автор

Thank you for the video!
But will it method be an issue for a performance of app?
If we put list via first method (with proper keys) React wouldn't re-render this list each time (just check a keys and show previous version if the keys are the same).
But via second method React will re-render all list each time. Am I right?
P.S. We can get a decent key via :
like a ourArray.map((e, i) => {<li
Is it? I just start to learn React so sorry for this question if it stupid.

alexanderzelenkov
Автор

coding is kids game as far as js, i guess

shaikh.quadeer
Автор

Or you can use React.Children.toArray ()

fidelp