Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Document patterns for using Recompose inside component modules #153

Open
acdlite opened this issue May 9, 2016 · 1 comment
Open

Document patterns for using Recompose inside component modules #153

acdlite opened this issue May 9, 2016 · 1 comment

Comments

@acdlite
Copy link
Owner

acdlite commented May 9, 2016

#136 (comment):

Personally, like @istarkov and @wuct, I prefer to separate the higher-order component part from the base component (I like to call it enhance, but same thing).

I also don't want to give the impression that Recompose is inherently at odds with the usual ways of creating components, like extending from React.Component or using. React.createClass. It's meant to be complementary, not a total replacement.

Perhaps instead of adding a new API, we should add a doc that describes the different options available for using higher-order components in your component modules?

@dakom
Copy link

dakom commented Sep 5, 2017

Documentation for usage would be very helpful.

I tend to run into lots of errors like A valid React element (or null) must be returned when I'm mixing different kinds of components in

Something I've run into frequently is needing to use switch() which I understand is not included for good reason, but then code that works with branch doesn't necessarily translate immediately into a switch construct.

Can't provide an example exactly- and maybe that's the point, it's something that bites me when all else is going smoothly and it would be great to have more docs to reference :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants