title: How to use the React map function
body: <p>I want to make the content and userId visible in the UI in the comments. But it doesn't react.</p>
  <p>This is an array of productinfo.</p>
  <p>console.log</p>
  <pre><code>Object
  Brand: &quot;5&quot;
  Carts: []
  Cody: &quot;3&quot;
  Comments: Array(27)
  0: {id: 28, content: &quot;ㅂㅈㄱ&quot;, createdAt: &quot;2021-05-21T01:27:39.000Z&quot;, updatedAt: &quot;2021-05-21T01:27:39.000Z&quot;, UserId: 1, …}
  1: {id: 27, content: &quot;12412&quot;, createdAt: &quot;2021-05-21T01:25:29.000Z&quot;, updatedAt: &quot;2021-05-21T01:25:29.000Z&quot;, UserId: 1, …}
  2: {id: 26, content: &quot;124&quot;, createdAt: &quot;2021-05-21T01:25:28.000Z&quot;, updatedAt: &quot;2021-05-21T01:25:28.000Z&quot;, UserId: 1, …}
  3: {id: 25, content: &quot;79&quot;, createdAt: &quot;2021-05-21T01:25:24.000Z&quot;, updatedAt: &quot;2021-05-21T01:25:24.000Z&quot;, UserId: 1, …}
  4: {id: 24, content: &quot;qwr&quot;, createdAt: &quot;2021-05-21T01:23:33.000Z&quot;, updatedAt: &quot;2021-05-21T01:23:33.000Z&quot;, UserId: 1, …}
  5: {id: 23, content: &quot;214&quot;, createdAt: &quot;2021-05-21T01:21:25.000Z&quot;, updatedAt: &quot;2021-05-21T01:21:25.000Z&quot;, UserId: 1, …}
  6: {id: 22, content: &quot;21&quot;, createdAt: &quot;2021-05-21T01:21:20.000Z&quot;, updatedAt: &quot;2021-05-21T01:21:20.000Z&quot;, UserId: 1, …}
  7: {id: 21, content: &quot;ㅂㅈㄱ&quot;, createdAt: &quot;2021-05-21T01:20:43.000Z&quot;, updatedAt: &quot;2021-05-21T01:20:43.000Z&quot;, UserId: 1, …}
  8: {id: 20, content: &quot;24&quot;, createdAt: &quot;2021-05-21T01:17:44.000Z&quot;, updatedAt: &quot;2021-05-21T01:17:44.000Z&quot;, UserId: 1, …}
  9: {id: 19, content: &quot;123&quot;, createdAt: &quot;2021-05-21T01:17:06.000Z&quot;, updatedAt: &quot;2021-05-21T01:17:06.000Z&quot;, UserId: 1, …}
  10: {id: 18, content: &quot;333&quot;, createdAt: &quot;2021-05-21T00:51:18.000Z&quot;, updatedAt: &quot;2021-05-21T00:51:18.000Z&quot;, UserId: 1, …}
  11: {id: 17, content: &quot;qwr&quot;, createdAt: &quot;2021-05-20T23:16:34.000Z&quot;, updatedAt: &quot;2021-05-20T23:16:34.000Z&quot;, UserId: 1, …}
  12: {id: 16, content: &quot;152&quot;, createdAt: &quot;2021-05-20T23:16:26.000Z&quot;, updatedAt: &quot;2021-05-20T23:16:26.000Z&quot;, UserId: 1, …}
  13: {id: 15, content: &quot;w&quot;, createdAt: &quot;2021-05-20T23:14:39.000Z&quot;, updatedAt: &quot;2021-05-20T23:14:39.000Z&quot;, UserId: 1, …}
  14: {id: 14, content: &quot;qwr&quot;, createdAt: &quot;2021-05-20T23:12:35.000Z&quot;, updatedAt: &quot;2021-05-20T23:12:35.000Z&quot;, UserId: 1, …}
  15: {id: 13, content: &quot;12&quot;, createdAt: &quot;2021-05-20T23:12:23.000Z&quot;, updatedAt: &quot;2021-05-20T23:12:23.000Z&quot;, UserId: 1, …}
  16: {id: 12, content: &quot;123&quot;, createdAt: &quot;2021-05-20T23:11:17.000Z&quot;, updatedAt: &quot;2021-05-20T23:11:17.000Z&quot;, UserId: 1, …}
  17: {id: 11, content: &quot;as&quot;, createdAt: &quot;2021-05-20T23:10:28.000Z&quot;, updatedAt: &quot;2021-05-20T23:10:28.000Z&quot;, UserId: 1, …}
  18: {id: 10, content: &quot;아싸&quot;, createdAt: &quot;2021-05-20T23:06:44.000Z&quot;, updatedAt: &quot;2021-05-20T23:06:44.000Z&quot;, UserId: 1, …}
  19: {id: 9, content: &quot;a&quot;, createdAt: &quot;2021-05-20T22:06:34.000Z&quot;, updatedAt: &quot;2021-05-20T22:06:34.000Z&quot;, UserId: 1, …}
  20: {id: 8, content: &quot;ㄱㅈㄱ&quot;, createdAt: &quot;2021-05-20T21:58:32.000Z&quot;, updatedAt: &quot;2021-05-20T21:58:32.000Z&quot;, UserId: 1, …}
  21: {id: 7, content: &quot;야호&quot;, createdAt: &quot;2021-05-20T21:57:34.000Z&quot;, updatedAt: &quot;2021-05-20T21:57:34.000Z&quot;, UserId: 1, …}
  22: {id: 6, content: &quot;ㅁㄴㅇ&quot;, createdAt: &quot;2021-05-20T21:53:26.000Z&quot;, updatedAt: &quot;2021-05-20T21:53:26.000Z&quot;, UserId: 1, …}
  23: {id: 5, content: &quot;야호&quot;, createdAt: &quot;2021-05-20T21:53:16.000Z&quot;, updatedAt: &quot;2021-05-20T21:53:16.000Z&quot;, UserId: 1, …}
  24: {id: 4, content: &quot;야호&quot;, createdAt: &quot;2021-05-20T21:51:39.000Z&quot;, updatedAt: &quot;2021-05-20T21:51:39.000Z&quot;, UserId: 1, …}
  25: {id: 3, content: &quot;야호&quot;, createdAt: &quot;2021-05-20T21:51:06.000Z&quot;, updatedAt: &quot;2021-05-20T21:51:06.000Z&quot;, UserId: 1, …}
  26: {id: 2, content: &quot;바보&quot;, createdAt: &quot;2021-05-20T05:24:21.000Z&quot;, updatedAt: &quot;2021-05-20T05:24:21.000Z&quot;, UserId: 1, …}
  length: 27
  </code></pre>
  <p>After entering the code like this, I tried to print the content, but it did not respond. I don't know how to fix that code.</p>
  <pre><code> &lt;ul&gt;
      {productinfo.Comments.map((content, id) =&gt;  // currentIndex, index -&gt; 
        &lt;li key={id} productinfo={content} /&gt;
      )} 
    &lt;/ul&gt;
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/PgcCs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PgcCs.png" alt="enter image description here" /></a></p>