Using data from context API #3671
Unanswered
stuartabrown
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
My application pulls data from an API and presents this data to the user. My table from react-table is just one component that uses this data and so I store the API response in Context. I am able to make this context data available to the table component, and I have a test to make sure the data is available before setting value / rendering, but for some reason the table does not appear. However if I use
<pre> <code> { JSON.stringify(data) } </code> </pre>
after my table component I can see the data is available.
The code for my component is below, any help would be much appreciated, I've been fighting this for ages now with no joy!
Beta Was this translation helpful? Give feedback.
All reactions