The Major Problem with Using Objects Over Arrays
We have chosen to work with objects, but aren't arrays easier to iterate over? The Lodash library will solve this problem for us.
I love the idea of using objects over arrays - for most use cases. There are some caveats to be aware of though.
Caveat #1 : It’s a lot easier to iterate over Arrays in your view logic.
A common situation you’ll find yourself in is the need to render a list of components.
For example, to render a list of users given a users prop, your logic would look something like this:
Get hands-on with 1400+ tech skills courses.