❗Axios is a peer dependency (prerequisite) and it has to be installed
NPM
$npmireact-use-apiaxios
Yarn
$yarnaddreact-use-apiaxios
Usage
With ApiProvider
import React from'react'import ReactDom from'react-dom'import useApi, { ApiProvider } from'react-use-api'import App from'./App'// there is only one props "context", which is must given for SSR,// client side can omit itReactDom.render( <ApiProvider> <App /> </ApiProvider>,document.getElementById('root'))