re: the index as keys anti-pattern….
React helpfully gives you a function to take care of *exactly* this problem…
re: the index as keys anti-pattern….
React helpfully gives you a function to take care of *exactly* this problem…
wrap your .map() result with React.Children.toArray()
{React.Children.toArray(todos.map((todo) =>
<Todo
{…todo}
/>
))}