react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Higher Order Components are missing from new documentation

Open marckornberger opened this issue 2 years ago • 2 comments
trafficstars

I found the "Advanced Guides" section in the legacy react docs extremely useful - especially Higher Order Components (HOCs).

Would it be possibly to add this section once again to the new docs? (or possibly on a differnet subpage)

I think the section was extremely useful for react new comers just starting out.

marckornberger avatar Oct 19 '23 11:10 marckornberger

Yes, HoCs are extremely useful. Would be very nice, if someone could update the new docs to include them as well. @marckornberger Are you willing to do this?

michaeljauk avatar Oct 20 '23 12:10 michaeljauk

I think they promote hook over HOC and hence simply won't document it in react.dev

Functional hook has been proven to replace HOC very nicely almost everywhere, such as i18n and Redux

For React newbies, I would recommend starting off with functional React right at the beginning and forget about classical React, which was exactly how I learned React. Hook is like the contemporary iPhone/Android and HOC sounds like the old Nokia keypad stick for now...

QubitPi avatar Nov 23 '23 07:11 QubitPi