Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects are not valid as a React child #39

Open
joetidee opened this issue Jan 8, 2020 · 0 comments
Open

Objects are not valid as a React child #39

joetidee opened this issue Jan 8, 2020 · 0 comments

Comments

@joetidee
Copy link

joetidee commented Jan 8, 2020

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>} />;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant