Skip to content

@ntucker ntucker released this Dec 23, 2019 · 66 commits to master since this release

4.0.0 (2019-12-23)

Full Announcement

💥 BREAKING CHANGES

  • Drop IE support (out of the box) #171
  • Remove useCacheLegacy() and useResourceLegacy() #170
  • rest-hooks/test -> @rest-hooks/test
  • fetchPlugin -> fetchOptionsPlugin, which has different signature
  • No more SuperagentResource export
  • url() and listUrl() params are no longer optional
  • New overridable Resource.fetchResponse()
    • fetch() now calls fetchResponse()
    • This means custom use of Response can be achieved by calling
      fetchResponse() in custom FetchShape.fetch

🚀 Features

  • New @rest-hooks/legacy package (#187) (78c9321)
  • export SimpleRecord which has the data methods of Resource (#203) (0c0dd49)

💅 Enhancement

  • Small bundle reduction by using typescript 'declare' (#177)
  • Move testing modules to own package (#182) (174461a)
  • Resource.fetch uses fetch instead of superagent (#199) (5c740ec)
  • Non-ES bundlers will use IE11 compatible build (29eaefc)
  • Remove extraneous generics on Resource statics (3be6a6a)
  • Better error messages when params mismatch FetchShape in useCache and useResource (#211)
  • Easier to handle http fetch headers in response (#208) (86074a6)
  • Include context in error message when failing to build PK (b754a64)
  • Resource.fetch() is no longer generic (#207) (e41da6c)

🐛 Bug Fix

📦 Package

🏠 Internal

  • Centralize babel config & common test (#189) (16d22a3)
  • Use TypeScript project references (#188) (412c674)
  • React.createContext -> createContext (c5ff9cc)
  • Ignore process.env.NODE_ENV checks for coverage (e71a0c1)
  • Update lint rules (#206) (732f875)

📝 Documentation

Assets 2
You can’t perform that action at this time.