New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

axios-hooks

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-hooks - npm Package Compare versions

Comparing version

to
1.2.1

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

### [1.2.1](https://github.com/simoneb/axios-hooks/compare/v1.2.0...v1.2.1) (2019-07-21)
## [1.2.0](https://github.com/simoneb/axios-hooks/compare/v1.1.5...v1.2.0) (2019-07-18)

@@ -7,0 +11,0 @@

8

index.d.ts
import { AxiosRequestConfig, AxiosError, AxiosPromise } from 'axios'
interface ResponseValues {
data: any
interface ResponseValues<T> {
data: T
loading: boolean

@@ -17,8 +17,8 @@ error?: AxiosError

export default function useAxios(
export default function useAxios<T = any>(
config: AxiosRequestConfig | string,
options?: Options
): [
ResponseValues,
ResponseValues<T>,
(config?: AxiosRequestConfig, options?: RefetchOptions) => void
]
{
"name": "axios-hooks",
"version": "1.2.0",
"version": "1.2.1",
"description": "axios-hooks",

@@ -5,0 +5,0 @@ "keywords": [

@@ -84,3 +84,3 @@ # axios-hooks

- `execute([config])` Function to execute the request manually, bypassing the cache. It optionally accepts the same `config` object as `axios`, which is _shallow-merged_ with the config object provided when invoking the hook. Useful to provide arguments to non-GET requests.
- `execute([config[, options]])` Function to execute the request manually, bypassing the cache by default. It optionally accepts the same `config` object as `axios`, which is _shallow-merged_ with the config object provided when invoking the hook. Useful to provide arguments to non-GET requests. It also optionally accepts an options object which has a `useCache` property, which allows caching to be enabled/disabled for this "execute" function.

@@ -87,0 +87,0 @@ ### configure({ cache, axios })