#Access error when using errorElement in Await

1 messages · Page 1 of 1 (latest)

hollow mirage
#

I'm using the new defer API, which is awesome. The one thing I can't figure out is how to access the error that was returned when rendering an error component using Await's errorElement prop:

<Suspense fallback={<HistoryTableSkeletonLoader />}>
  <Await resolve={historyTableData} errorElement="Error loading table data"> // would like to render the error message from the server here
    {(tableData) => <HistoryTable historyTableData={tableData} />}
  </Await>
</Suspense>
nova moss
hollow mirage
#

nailed it.

#

simple case of rtfm?

nova moss
#

eh, it's a bit confusing since resolve has a render prop API and reject doesn't