style: formatted code

This commit is contained in:
arthurfiorette 2022-02-04 07:53:48 -03:00
parent ab68a9f756
commit 1f884e9de5
No known key found for this signature in database
GPG Key ID: 9D190CD53C53C555
4 changed files with 9 additions and 20 deletions

View File

@ -1,20 +1,9 @@
# Result
Run at Tue, 01 Feb 2022 16:36:36 GMT
Commit: 27b9a4972cb3bd56f1246db5b5e15136b7bd07e9
Run at Tue, 01 Feb 2022 16:36:36 GMT Commit: 27b9a4972cb3bd56f1246db5b5e15136b7bd07e9
CACHE INTERCEPTOR Operations: 42851/s Network requests: 1 of 211656 Performance: 100%
CACHE INTERCEPTOR
Operations: 42851/s
Network requests: 1 of 211656
Performance: 100%
CACHE ADAPTER Operations: 37717/s Network requests: 2 of 183672 Performance: 88%
CACHE ADAPTER
Operations: 37717/s
Network requests: 2 of 183672
Performance: 88%
AXIOS
Operations: 1591/s
Network requests: 7976 of 7976
Performance: 4%
AXIOS Operations: 1591/s Network requests: 7976 of 7976 Performance: 4%

View File

@ -1,6 +1,8 @@
# Usage and Examples
There are some other examples in the [examples]([https://](https://github.com/arthurfiorette/axios-cache-interceptor/tree/main/examples), check them out! You can also make a PR to add some more.
There are some other examples in the
[examples]([https://](https://github.com/arthurfiorette/axios-cache-interceptor/tree/main/examples),
check them out! You can also make a PR to add some more.
## Applying

View File

@ -46,4 +46,4 @@ app.get('/cache/:id/get', async (req, res) => {
res.json(cache);
});
app.listen(3000);
app.listen(3000);

View File

@ -8,9 +8,7 @@ import Axios from 'axios';
import { createContext, useContext, useState } from 'react';
import { setupCache } from '../../src'; // axios-cache-interceptor
/**
* @type {import('react').Context<import('../../src').AxiosCacheInstance>}
*/
/** @type {import('react').Context<import('../../src').AxiosCacheInstance>} */
const AxiosContext = createContext(null);
export const useAxios = () => useContext(AxiosContext);