mirror of
https://github.com/simoneb/axios-hooks.git
synced 2025-12-08 21:25:56 +00:00
feat: remove config serialization
This commit is contained in:
parent
7cbd7f4063
commit
06a819728d
@ -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 }),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user