this.props.lunch example is populated async object
blainegarrett opened this issue · 1 comments
blainegarrett commented
In the example decorator
@asyncConnect({ lunch: (params, helpers) => Promise.resolve({id: 1, name: 'Borsch'}) })
the decorated component has this.props.lunch
available with a value of {id: 1, name: 'Borsch'}
such that you can do this.props.lunch.name
.
However, for me this.props.lunch
has a value of { loading: false, loaded: true, data: { id: 1, name: 'Borsch' } }
such that to access the name
I need to do this.props.lunch.data.name
I feel like there is a missing then()
from the example? Any tips to debug?
sars commented
@blainegarrett in newer version (1.0.x) it works as you expect..