Skip to content

Objects are not valid as a React child #39

@joetidee

Description

@joetidee

I am getting the following error on the browser console, using react-promise v3.0.2:

Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {loading, error, value}). If you meant to render a collection of children, use an array instead.

Code is:

...
import Async from 'react-promise';

const CheckoutLayout = (props) => {
  
    function getCheckoutBasket() {
        return props.actions.fetchBasket()
    }

    return <Async promise={getCheckoutBasket()} then={result => <Fragment>hello</Fragment>} />;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions