map() array quiz

Juyeon Lee·2022년 4월 26일
0

REACT 리액트

목록 보기
14/65
  1. What does the .map() array method do?
    Returns a new array. Whatever gets returned from the callback
    function provided is placed at the same index in the new array.
    Usually we take the items from the original array and modify them
    in some way.
  1. What do we usually use .map() for in React?
    Convert an array of raw data into an array of JSX elements
    that can be displayed on the page.
  1. Why is using .map() better than just creating the components
    manually by typing them out?
    It makes our code more "self-sustaining" - not requiring
    additional changes whenever the data changes.

0개의 댓글