Skip to content

Zach: extract code into helper functions when possible #40

@juliebarwick

Description

@juliebarwick

const objectBuilder = (products) => {

This helper function looks like it could be moved into utils file or folder. In general this component is getting a bit unwieldy. See if you can extract some.

Also, I'm not sure but you may consider useRefs if you really need to DOM properties directly (for ex, line 83 in onCompareProductClick). Docs: https://reactjs.org/docs/refs-and-the-dom.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions