๐Ÿ“šย Reference


key


render() {
  return (
    <>
      <header>{/* ์ƒ๋žต */}</header>
      <div className="container">
        <form>{/* ์ƒ๋žต */}</form>
        <div className="content">
          {searchResult.length <= 0 ? (
            <div>๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค</div>
          ) : (
            // 1
            <ul>
              {/* 2 */}
              {searchResult.map(item) => (
                // 3
                <li>
                  <img src={item.imageUrl} />
                  <p>{item.name}</p>
                </li>
              ))}
            </ul>
          )}
        </div>
      </div>
    </>
  )
}