CONTACT US

    Why you should use an object, and not an array, for lists in Redux

    Close-up of a computer screen displaying colourful lines of code, including functions for filtering, sorting, and iterating over arrays, written in a functional programming language.
    • With object solution you won’t get duplicated items.
    • Using an object will save your future self some time and bugs.
    • CRUD operations do not iterate over all items each time.
    • If you need an array of items, just add selector that will convert object to array.

    Article link copied

    Close button