Skip to content

6.0.0

Compare
Choose a tag to compare
@wangcch wangcch released this 15 May 02:35
· 56 commits to main since this release

BREAKING CHANGES

You must update all imports from '@react-cmpt/react-request-hook' to '@axios-use/react'

🚨🚨🚨 Find/replace @react-cmpt/react-request-hook for @axios-use/react and upgrade to v6

Features

  • Customize the Axios instance of the current item. (#10)
    const customIns = axios.create({
      // ...
    });
    
    function Profile({ userId }) {
      const [{ data, error, isLoading }] = useResource(
        (id) => ({ url: `/user/${id}` }),
        [userId],
        { instance: customIns },
      );
    
      // ...
    }
  • useResource: requestParams type can be false. (887aabc)

Chore