Skip to content

Static Data not immediately fulfilled? #63

@neezer

Description

@neezer

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions