fromRenderProps RenderPropsComponent props
Hi. As I know when I use renderComponent renderer component gets props from previous HOCs.
But here fromRenderProps, component doesn't get nothing.
Is there any reason why component from fromRenderProps not get props from previous HOCs?
export default compose(
defaultProps({
query: {
a: 10
}
}),
fromRenderProps(Query, ({ writeData }) => ({
writeData
})),
);
Expect: Query component gets query as prop during initialization here fromRenderProps.
Actual: Query initializes without props;
cc @evenchange4
@istarkov Having this fixed locally for some time, I've finally found some time to push it.
@sshmyg AFAIK, the first argument of fromRenderProps is something like Consumer of React context, e.g., ThemeContext.Consumer. It is not the target component that gets wrapped inside the final HOC, therefore this is an expected behavior and not a bug.