cssinjs / cssinjs/jss

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

Open
#1,459 3 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

### The Problem
From what I've seen [in the docs](https://cssinjs.org/react-jss/?v=v10.5.1), 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.

---

- [x] **I am willing to implement this**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.