Fetch data in an interval
const App = () => <DataLoader name="api3" apiCall={mockApi} interval={3000}> { (loader: Loader<number>) => { if (loader.loading || loader.error) { return <div>loading...</div> } return <div>{loader.data}</div> } } </DataLoader>
Last updated 5 years ago