Skip to content

Releases: klis87/redux-requests

@redux-requests/react v1.5.0

17 Jan 00:00
Compare
Choose a tag to compare

Small useQuery update - useQuery response object also contains stopPolling memoized callback for convenience.

@redux-requests/core v1.5.0

16 Jan 23:59
Compare
Choose a tag to compare

Added support for short polling - automatic repeating a given query each defined number of seconds. In details:

  • added meta.poll, which you can add to any of your query, like:
const fetchBooks = () => ({
  type: 'FETCH_BOOKS',
  request: '/books',
  meta: { poll: 10 },
});

which would dispatch fetchBooks every 10 seconds

  • added stopPolling action, with the same signature as abortRequests
  • resetRequests from now on also stops all pollings for relevant query types
  • note that polling doesn't obviously work when ssr: 'server' in handleRequests

@redux-requests/react v1.4.1

13 Jan 01:27
Compare
Choose a tag to compare

This is a very big release, no backward changes but many new features:

  • useQuery and useMutation got many new props, allowing to get auto fetching, auto resetting, suspense support, SSR suspense, throwing errors to catch by error boundary
  • new RequestsProvider component, which allows to change defaults for hooks and can setup Redux store for you optionally
  • RequestsErrorBoundary helper

See https://redux-requests.klisiczynski.com/docs/guides/usage-with-react for details

@redux-requests/core v1.4.0

13 Jan 01:23
Compare
Choose a tag to compare

This release added mostly several things which were needed for new version of React bindings:

  • added joinRequest action, so that you can attach to a pending request and get its response promise
  • added new flag to resetRequests not to reset cached queries
  • added addWatcher and removeWatcher actions - those are probably needed only for UI bindings like React internally
  • reseted queries and mutations are actually removed from state, not remaining but with default values
  • added disableRequestsPromise option to handleRequest, for now probably useful only with new suspense SSR mode for React

@redux-requests/react v1.3.0

02 Dec 00:06
Compare
Choose a tag to compare

Added support for tracking download and upload progress. See release for core 1.3.0.

@redux-requests/graphql v1.1.0

02 Dec 00:05
Compare
Choose a tag to compare

Added support for tracking download and upload progress. See release for core 1.3.0.

@redux-requests/core v1.3.0

02 Dec 00:02
Compare
Choose a tag to compare

Added support for tracking download and upload progress. For now available only for axios and graphql drivers. Also, due to complexity, for now batched requests are not supported, albeit this is a very rare edge case anyway. How to use it? Just add meta.measureDownloadProgress or meta.measureUploadProgress to your actions and read downloadProgress and uploadProgress from any selectors! Thanks @iwan-uschka for this brilliant idea!

@redux-requests/axios v1.1.0

02 Dec 00:05
Compare
Choose a tag to compare

Added support for tracking download and upload progress. See release for core 1.3.0.

@redux-requests/react v1.2.0

31 Oct 14:03
Compare
Choose a tag to compare

Added useDispatchRequest hook - this is just an alias for useDispatch from react-redux, but with a better Typescript typing.

You could learn all details here.

@redux-requests/core v1.2.0

31 Oct 13:59
Compare
Choose a tag to compare

Typescript related additions:

  • added LocalMutationAction interface
  • added createRequestsStore function to decorate store with dispatchRequest method - alias for dispatch but with better typings
  • now all interceptors have RequestsStore passed instead of normal store, the only difference is that you get an access to dispatchRequest method
  • added an optional action prop to getQuery and getQuerySelector to automatically infer data generic
  • added ResponseData utility type

You could learn all details in docs.