axios-hooks
Advanced tools
Comparing version
@@ -5,2 +5,9 @@ # Changelog | ||
## [2.4.0](https://github.com/simoneb/axios-hooks/compare/v2.4.0-0...v2.4.0) (2021-03-05) | ||
### Features | ||
* remove config serialization ([06a8197](https://github.com/simoneb/axios-hooks/commit/06a819728d7631c0ac26e774b447885597ba6c2f)) | ||
## [2.4.0-0](https://github.com/simoneb/axios-hooks/compare/v2.3.0...v2.4.0-0) (2021-02-12) | ||
@@ -7,0 +14,0 @@ |
@@ -278,7 +278,7 @@ "use strict"; | ||
function useAxios(config, options) { | ||
config = _react["default"].useMemo(function () { | ||
return configToObject(config); | ||
}, // eslint-disable-next-line react-hooks/exhaustive-deps | ||
[JSON.stringify(config)]); | ||
function useAxios(_config, options) { | ||
var config = _react["default"].useMemo(function () { | ||
return configToObject(_config); | ||
}, [_config]); | ||
options = _react["default"].useMemo(function () { | ||
@@ -285,0 +285,0 @@ return (0, _extends3["default"])({}, defaultOptions, options); |
@@ -1,4 +0,4 @@ | ||
import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import React from 'react'; | ||
@@ -261,7 +261,6 @@ import StaticAxios from 'axios'; | ||
function useAxios(config, options) { | ||
config = React.useMemo(function () { | ||
return configToObject(config); | ||
}, // eslint-disable-next-line react-hooks/exhaustive-deps | ||
[JSON.stringify(config)]); | ||
function useAxios(_config, options) { | ||
var config = React.useMemo(function () { | ||
return configToObject(_config); | ||
}, [_config]); | ||
options = React.useMemo(function () { | ||
@@ -268,0 +267,0 @@ return _extends({}, defaultOptions, options); |
{ | ||
"name": "axios-hooks", | ||
"version": "2.4.0-0", | ||
"version": "2.4.0", | ||
"description": "axios-hooks", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/runtime": "7.12.13", | ||
"@babel/runtime": "7.13.9", | ||
"lru-cache": "6.0.0" | ||
@@ -45,9 +45,9 @@ }, | ||
"devDependencies": { | ||
"@babel/cli": "7.12.16", | ||
"@babel/core": "7.12.16", | ||
"@babel/plugin-transform-runtime": "7.12.15", | ||
"@babel/preset-env": "7.12.16", | ||
"@babel/cli": "7.13.0", | ||
"@babel/core": "7.13.8", | ||
"@babel/plugin-transform-runtime": "7.13.9", | ||
"@babel/preset-env": "7.13.9", | ||
"@babel/preset-react": "7.12.13", | ||
"@commitlint/cli": "11.0.0", | ||
"@commitlint/config-conventional": "11.0.0", | ||
"@commitlint/cli": "12.0.1", | ||
"@commitlint/config-conventional": "12.0.1", | ||
"@testing-library/react": "11.2.5", | ||
@@ -57,10 +57,10 @@ "@testing-library/react-hooks": "4.0.1", | ||
"@types/lru-cache": "5.1.0", | ||
"@types/node": "12.12.24", | ||
"@types/react": "17.0.1", | ||
"@types/react-dom": "17.0.0", | ||
"@types/node": "12.20.4", | ||
"@types/react": "17.0.2", | ||
"@types/react-dom": "17.0.1", | ||
"axios": "0.21.1", | ||
"babel-eslint": "10.1.0", | ||
"cross-env": "7.0.3", | ||
"eslint": "7.19.0", | ||
"eslint-config-prettier": "7.2.0", | ||
"eslint": "7.21.0", | ||
"eslint-config-prettier": "8.1.0", | ||
"eslint-plugin-import": "2.22.1", | ||
@@ -70,3 +70,3 @@ "eslint-plugin-prettier": "3.3.1", | ||
"eslint-plugin-react-hooks": "4.2.0", | ||
"husky": "5.0.9", | ||
"husky": "5.1.3", | ||
"jest": "26.6.3", | ||
@@ -80,5 +80,5 @@ "lint-staged": "10.5.4", | ||
"rimraf": "3.0.2", | ||
"standard-version": "9.1.0", | ||
"ts-jest": "26.5.1", | ||
"typescript": "4.1.5" | ||
"standard-version": "9.1.1", | ||
"ts-jest": "26.5.3", | ||
"typescript": "4.2.3" | ||
}, | ||
@@ -85,0 +85,0 @@ "husky": { |
@@ -200,8 +200,4 @@ import React from 'react' | ||
function useAxios(config, options) { | ||
config = React.useMemo( | ||
() => configToObject(config), | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
[JSON.stringify(config)] | ||
) | ||
function useAxios(_config, options) { | ||
const config = React.useMemo(() => configToObject(_config), [_config]) | ||
@@ -208,0 +204,0 @@ options = React.useMemo( |
52822
0.01%792
-0.75%+ Added
- Removed
Updated