Skip to content

Commit

Permalink
feat: remove config serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneb committed Mar 3, 2021
1 parent 7cbd7f4 commit 06a8197
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,8 @@ export function makeUseAxios(configureOptions) {
)
}

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])

options = React.useMemo(
() => ({ ...defaultOptions, ...options }),
Expand Down

0 comments on commit 06a8197

Please sign in to comment.