> For the complete documentation index, see [llms.txt](https://react-use-api.gitbook.io/react-use-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://react-use-api.gitbook.io/react-use-api/api/loadapicache.md).

# loadApiCache

### Load cached API data

{% code title="src/index.jsx" %}

```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import { ApiProvider, loadApiCache } from 'react-use-api'

import App from './components/App'

const rootElement = document.getElementById('root')
const method = rootElement.hasChildNodes() ? 'hydrate' : 'render'

loadApiCache()

ReactDOM[method](
  <ApiProvider>
    <App />
  </ApiProvider>,
  rootElement
)
```

{% endcode %}
