redux-connect icon indicating copy to clipboard operation
redux-connect copied to clipboard

Passing async response data as prop.

Open ttbrijkishor opened this issue 6 years ago • 1 comments

Hi,

I have a use case where I need to pass data as prop to component and need to avoid putting it into redux store. Data is coming from asyncItem. I have gone through the decorator code but didn't find a solution.

Any suggestion would be great help.Thanks.

Regards, Brij Kishor

ttbrijkishor avatar Jun 21 '18 13:06 ttbrijkishor

@ttbrijkishor see https://github.com/makeomatic/redux-connect/blob/master/docs/API.MD#asyncconnect-decorator

The interface is similar to react-redux connect. The key field of each object will be used to connect data returned from from promise to both the redux state and the corresponding prop in the component. So in example above you'll have this.props.lunches.

finom avatar Jun 22 '18 18:06 finom