Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Non-function React component as the last parameter of pipe() or renderComponent() #10

Open
arty-name opened this issue Nov 6, 2019 · 2 comments

Comments

@arty-name
Copy link

The "Smart/Presentational Components" section of readme says that pipe(withProps({}), Component) is a supported use case.

The implementation of pipe() is concise and elegant. Unfortunately it doesn’t work when the supplied Component was created by e.g. React.forwardRef() and thus is not a function but an object.

Could you add support for such components as well?

@arty-name
Copy link
Author

Actually the defaultProps are also lost when used this way.

@arty-name arty-name changed the title Non-function React component as the last parameter of pipe() Non-function React component as the last parameter of pipe() or renderComponent() Nov 7, 2019
@arty-name
Copy link
Author

Apparently renderComponent() also assumes that component is a function

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

1 participant