Skip to content

Convert higher-order components to hooks #577

@camdendotlol

Description

@camdendotlol

performant-software/core-data-cloud#597 involved refactoring a couple HOCs from react-components into React hooks because of inherent limitations in the way those HOC-based components are written. We should propagate those changes back to react-components and do a similar refactor to other HOC or HOC-like components throughout react-components.

In other words, anywhere we have a component like:

const NewComponent = withFancyStuff(Component, config)

it should be refactored to something like:

const fancyStuff = useFancyStuff(config)

In addition to addressing the lifecycle issues, this would also modernize the codebase to be more in line with idiomatic React in the era of hooks and functional components.

This would change the API surface, so it would need to be a new major release.

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