All Questions
1 question
4
votes
2
answers
1k
views
Arrays vs Maps for listing items that have a unique id
I've been finding that for a lot of code I've been writing recently, it naively might look like this:
Array approach:
const options = [
{
id: 'red',
label: 'Red',
data: '#f00'
...