Skip to content

Commit 7e916b1

Browse files
committed
docs: take off gitbook url and update minor changes
1 parent 18f4246 commit 7e916b1

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

README.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ $ npm i react-use-api axios
3333
$ yarn add react-use-api axios
3434
```
3535

36-
## Gitbook Document
37-
38-
[https://react-use-api.gitbook.io/react-use-api/](https://react-use-api.gitbook.io/react-use-api/)
39-
4036
## Usage
4137

4238
### Setup With ApiProvider
@@ -451,19 +447,19 @@ export const render = async (req, axios) => {
451447

452448
_Each property is optional_
453449

454-
| Name | Type | Default | Description |
455-
| ------------------------------- | ----------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
456-
| cache | LRU<String, ReactUseApi.CacheData \| any> | new LRU() | The cache instance based on lru-cache |
457-
| axios | AxiosStatic \| AxiosInstance | axios | axios instance (http client) |
458-
| maxRequests | number | 50 | The maximum of API requests when SSR |
459-
| useCacheData | boolean | true | Set true to inject JS cache data into html when calling `injectSSRHtml()` |
460-
| alwaysUseCache | boolean | false | Set true to use cache data always (equivalent to `options.useCache = true`) |
461-
| clearLastCacheWhenConfigChanges | boolean | true | This is default behavior that the cached data will be removed as long as the url config of useApi has been changed. Set false to remain the cached data |
462-
| debug | boolean | true | Set true to get debug message from console |
463-
| clientCacheVar | string | 'USE_API_CACHE' | The JS variable name of cache data |
464-
| renderSSR | Function | () => '' | A callback to render SSR string for injectSSRHtml() |
465-
| isSSR | Function | () => typeof window === 'undefined' | A function to determine if the current environment is server |
466-
| shouldUseApiCache | Function | (config?: ReactUseApi.Config, cacheKey?: string): boolean | Returns true to enable useApi to get the API data from API cache, which is loaded by `loadApiCache`. Default is true |
450+
| Name | Type | Default | Description |
451+
| ------------------------------- | ----------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
452+
| cache | LRU<String, ReactUseApi.CacheData \| any> | new LRU() | The cache instance based on lru-cache |
453+
| axios | AxiosStatic \| AxiosInstance | axios | axios instance (http client) |
454+
| maxRequests | number | 50 | The maximum of API requests when SSR |
455+
| useCacheData | boolean | true | Set true to inject JS cache data into html when calling `injectSSRHtml()` |
456+
| alwaysUseCache | boolean | false | Set true to use cache data always (equivalent to `options.useCache = true`) |
457+
| clearLastCacheWhenConfigChanges | boolean | true | This is default behavior that the cached data will be removed once the url config of useApi has been changed. Set false to remain the cached data |
458+
| debug | boolean | true | Set true to get debug message from console |
459+
| clientCacheVar | string | 'USE_API_CACHE' | The JS variable name of cache data |
460+
| renderSSR | Function | () => '' | A callback to render SSR string for injectSSRHtml() |
461+
| isSSR | Function | () => typeof window === 'undefined' | A function to determine if the current environment is server |
462+
| shouldUseApiCache | Function | (config?: ReactUseApi.Config, cacheKey?: string): boolean | Returns true to enable useApi to get the API data from API cache, which is loaded by `loadApiCache`. Default is true |
467463

468464
#### Arguments of injectSSRHtml
469465

0 commit comments

Comments
 (0)