Skip to content

Commit

Permalink
chore(release): 1.8.0-0
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneb committed Nov 30, 2019
1 parent 2b0e9a5 commit 5c0f4e1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.8.0-0](https://github.com/simoneb/axios-hooks/compare/v1.7.2...v1.8.0-0) (2019-11-30)


### Features

* support multiple instances of useAxios configured independently ([2b0e9a5](https://github.com/simoneb/axios-hooks/commit/2b0e9a58ed55d581f2b06244d68fa8d5609ed50d)), closes [#98](https://github.com/simoneb/axios-hooks/issues/98)

### [1.7.2](https://github.com/simoneb/axios-hooks/compare/v1.7.1...v1.7.2) (2019-11-13)


Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ ReactDOM.hydrate(<App />, document.getElementById('root'))

## Multiple Hook Instances

Sometimes it is necessary to communicate with different APIs or use different caching strategies for different HTTP interactions.
Sometimes it is necessary to communicate with different APIs or use different caching strategies for different HTTP interactions.

[`makeUseAxios`](#makeuseaxios-cache-axios) allows to create multiple instances of the `useAxios` React Hook which can be configured and managed independently.
[`makeUseAxios`](#makeuseaxios-cache-axios) allows to create multiple instances of the `useAxios` React Hook which can be configured and managed independently.

In other words, `makeUseAxios` is a factory of `useAxios`, which returns a React Hook configured against the provided `axios` or `cache` instances.

Expand All @@ -291,13 +291,11 @@ import axios from 'axios'
import { makeUseAxios } from 'axios-hooks'

const useAxios = makeUseAxios({
axios: axios.create({ baseUrl: 'https://api.myjson.com '})
axios: axios.create({ baseURL: 'https://api.myjson.com' })
})

function App() {
const [{ data, loading, error }, refetch] = useAxios(
'/bins/820fc'
)
const [{ data, loading, error }, refetch] = useAxios('/bins/820fc')

if (loading) return <p>Loading...</p>
if (error) return <p>Error!</p>
Expand All @@ -311,7 +309,6 @@ function App() {
}
```


## Promises

axios-hooks depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axios-hooks",
"version": "1.7.2",
"version": "1.8.0-0",
"description": "axios-hooks",
"keywords": [
"axios",
Expand Down

0 comments on commit 5c0f4e1

Please sign in to comment.