Skip to content

[docs] Improve Help for People Doing a Lazy Migration for HOCs #1459

@ITenthusiasm

Description

@ITenthusiasm

The Problem

From what I've seen in the docs, there doesn't seem to be much straightforward assistance for those upgrading React JSS when it comes to HOCs. Some useful links are posted, but it would be helpful if the user didn't have to learn/read up on all the topics on their own.

The Solution

Instead of redirecting the user to other articles, the docs could provide an example of creating a custom HOC in JS/TS that implements the new hooks API (in addition to providing links for those interested in learning more).

Some Thoughts/Concerns

  1. If a HOC example was provided that used hooks, it may not be easy to provide a [simple] example that's compatible with decorators. (If decorators aren't a focus/concern, then this isn't a problem.)
  2. I wasn't sure if an example solution was excluded to avoid being opinionated. Thoughts or clarity on this would be helpful.

  • I am willing to implement this

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsCode is fine, documentation is not.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions