Skip to content

Releases: idanlo/react-spotify-api

v3.0.0

14 Apr 16:51
Compare
Choose a tag to compare

Version 3.0.0 Breaking Change

Before version 3.0.0 the parameters to props.children were passed in this order - data, loading, error. It is now passed as an object, so you would now use the Album component like this -

<Album id={...}>
  {({ data }) => {
    return <></>;
  }}
</Album>

As opposed to the previous versions where you would use the components like this -

<Album id={...}>
  {(data, loading, error) => {
    return <></>;
  }}
</Album>

This way you can choose which parameters you would like to have, and if you want just the error parameter you can omit the other two. This works well with the loadMoreData parameter, you don't need to write all 4 parameters if you just need some of them.

  • update README.md 94aeb11
  • calling props.children directly, add loadMoreData function to useApiRequest which can load more data if the data object has the 'next' and 'items' properties, the parameters are now an object and not multiple params 8fb3e9f

v2.6.0...v3.0.0

2.6.0

17 Mar 11:28
Compare
Choose a tag to compare
  • add publishConfig to packge.json 65b30f0

v2.5.0...v2.6.0

Fix security vulnerabilities

11 Jul 08:57
Compare
Choose a tag to compare
  • Merge pull request #41 from idanlo/dependabot/npm_and_yarn/lodash.template-4.5.0 4413261
  • Merge pull request #42 from idanlo/dependabot/npm_and_yarn/lodash-4.17.14 5e4d148
  • [Security] Bump lodash from 4.17.11 to 4.17.14 8082344
  • [Security] Bump lodash.template from 4.4.0 to 4.5.0 2ed9042

v2.3.0...v2.4.0

v2.3.0

09 Jun 12:49
Compare
Choose a tag to compare
  • update readme for datatypes 5529ef5

v2.2.0...v2.3.0

Components now return the error as an object!

09 Jun 12:43
Compare
Choose a tag to compare
  • #22 - fix older apirequest component tests - the error is now an object/null and not a boolean value f0a9285
  • #22 - test new url mock paths b34f4b0
  • #22 - add more mock paths to return different types of errors cb06f32
  • #22 add error handling with the response object received by the fetch API 4c694d9
  • #22 update deprecated no-watch arg in test script 6cb77a3

Thanks @jamsinclair for contributing!

v2.1.0...v2.2.0

v2.1.0

09 Jun 12:28
Compare
Choose a tag to compare
  • set data to null when there is an error, set error to null when there is data - so when props change the data/error/loading resets a7ec91d
  • #22 - pass the actual error object if an error exists 7c12408

v2.0.1...v2.1.0

v2.0.1

09 Jun 12:19
Compare
Choose a tag to compare
  • the fetch api is different than axios - errors appear in the data object - handle that cfc85f4
  • fix webpack-dev-server dependency error that caused travis ci build to fail 367dbe6

v2.0.0...v2.0.1

Version 2!

07 Jun 17:41
Compare
Choose a tag to compare

Fix a bug where changing the query in the Search component or useSearch hook would not trigger a re-fetch of the data.

v1.7.0-2...v2.0.0

v1.7.0-2

07 Jun 17:37
Compare
Choose a tag to compare
v1.7.0-2 Pre-release
Pre-release
  • add console logs for debugging fbd7377

v1.7.0-1...v1.7.0-2

v1.7.0-1

07 Jun 17:22
Compare
Choose a tag to compare
v1.7.0-1 Pre-release
Pre-release
  • add the search query to the dependency list of the useApiRequest hook and also move the loadData function inside the hook to follow the hooks rules 7e23946

v1.7.0-0...v1.7.0-1