You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.)
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
The text was updated successfully, but these errors were encountered:
If I understand correctly you are looking for an example how to create a HOC using the hook as a goal to keep using the existing components using HOC, right?
I think it's a great idea and we should add this when we decide to remove the HOC. Right now the message is to stop using them and use hooks interface.
You or anyone else are welcome to add such an example to the docs!
You or anyone else are welcome to add such an example to the docs!
I'll try to look into this some time this weekend or next. I think the example shouldn't be too hard to create. Feel free to ping me again if I vanish after the next 2 weeks.
I'll try to look into this some time this weekend or next. I think the example shouldn't be too hard to create. Feel free to ping me again if I vanish after the next 2 weeks.
Literally 3 weeks ago. But other things have left me preoccupied, obviously. With #1460 out of the way, and with the confusion of #1469 resolved, I'm going to start working on a draft for this. Hopefully it should be a pretty small change.
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
The text was updated successfully, but these errors were encountered: