React相关知识和经验的碎片化记录

react

1、Warning: validateDOMNesting(...): Whitespace text nodes cannot appear as a child of . Make sure you don't have any extra whitespace between tags on each line of your source code.

<tbody>

{arr? arr.map((obj,Index,arr) =>

<tr key={Index.toString()}>

<td>{arr[Index].Index+1}</td>

<td></td>

<td></td>

</tr>

): ''}

</tbody>

应改为:

<tbody>

{arr? arr.map((obj,Index,arr) =>

<tr key={Index.toString()}>

<td>{arr[Index].Index+1}</td>

<td></td>

<td></td>

</tr>

): <tr></tr>}

</tbody>

以上是 React相关知识和经验的碎片化记录 的全部内容, 来源链接: utcz.com/z/381314.html

回到顶部