Skip to content

Optimized deep data works #17

@YuriGor

Description

@YuriGor

Hi, it's a very interesting project!
I was curious how deepdash is used here and I suggest to use findValueDeep method here
instead of eachDeep, because findDeep will stop on first found value, while eachDeep will not (until you will ask it)
new code(not tested) may look like

// get the data for the id in the route param if there is one
export const getItemWithId = (data, id) => findValueDeep(data, { id });

note that lodash's iteratee is supported so you can also make a code a bit shorter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions