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>