How can I generate custom IDs for input without using any packages/moduls outside of React?
I found this example for unique keys using index, but as one user pointed out, while React documentation says you can do it that way:
const todoItems = todos.map((todo, index) =>
// Only do this if items have no stable IDs
<li key={index}>
{todo.text}
</li>
);
It's not wise to use index for this. Is there any other way I could generate unique IDs with React? Thanks!