Using the array index

suggest change

If you don’t have stable ids, you can use the numeric index as a last resort. Index keys break down when the list is reordered, filtered, or has items inserted at the front, because React then reuses the wrong component state.

render() {
  const { todos } = this.props;
  return (
    <ul>
      { todos.map((todo, index) =>
        <li key={ `todo-${index}` }>
          { todo.text }
        </li>
      }
    </ul>
  );
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents