Maybe I'm misunderstanding something, but I'd assume that static data definitions like the following:
export default connect((props) => ({
userFetch: { value: { id: 1, name: 'Tigger' }}
})(Component);
... would be available immediately, say, in the initial render:
render() {
const user = this.props.userFetch.value;
}
However, it seems that on the initial render, this.props.userFetch.pending is true. I can't seem to get access to the static data until componentWillReceiveProps.
Shouldn't the PromiseState for a static data definition be immediately fulfilled?
Maybe I'm misunderstanding something, but I'd assume that static data definitions like the following:
... would be available immediately, say, in the initial render:
However, it seems that on the initial render,
this.props.userFetch.pendingistrue. I can't seem to get access to the static data untilcomponentWillReceiveProps.Shouldn't the
PromiseStatefor a static data definition be immediately fulfilled?