Non-function React component as the last parameter of pipe() or renderComponent()
Opened this issue · 2 comments
arty-name commented
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 commented
Actually the defaultProps
are also lost when used this way.
arty-name commented
Apparently renderComponent()
also assumes that component is a function