Improvements
- The plugin is now faster, supporting considerably larger lists of resources. Although the API remains the same, this is a major version bump because there is now a dependency on Set. Be sure to include a polyfill for Set if you need to support legacy browsers, such as IE < 11.
- All packages are now distributed with licenses. The list of package versions is as follows:
redux-resource@3.1.1
redux-resource-action-creators@2.0.2
redux-resource-prop-types@4.0.2
redux-resource-plugins@3.2.1
redux-resource-xhr@4.0.2
New Features
getResources
now supports a third argument,options
. Pass{ byId: true }
to receive the resources as an object rather than an array.
New Features
- The
includedResources
plugin now supports update requests in addition to create and read requests.
Bug Fixes
instanceof Array
calls have been replaced withArray.isArray
to improve support for multiple global environments.
Bug Fixes
- Fixes an issue where the
DELETE_RESOURCES
action type could log an invalid warning message to the console in certain situations.
New Features
- The
includedResources
plugin now supports create requests in addition to read requests.
Bug Fixes
- Fixes an error that was thrown in certain environments, such as React Native
Bug Fixes
- The
actionTypes
export has been fixed. It was not exportingUPDATE_RESOURCES
norDELETE_RESOURCES
.
- All libraries have been updated to allow for Redux@4 as a peer dependency.
redux-resource@3.0.0
Migration guide
Breaking Changes
-
The
NULL
request status has been renamed toIDLE
. The request action types (such asREAD_RESOURCES_NULL
) have been updated to reflect this new name. -
As a consequence of the above change,
getStatus
will now return an object with anidle
key rather than anull
key. -
The deprecated
getResources()
signature that accepted three arguments has been removed. -
Omitting a
filter
when callinggetResources
now returns all of the resources in the slice. -
Four action types have been reserved for a future minor release of Redux Resource:
REQUEST_IDLE
,REQUEST_PENDING
,REQUEST_SUCCEEDED
, andREQUEST_FAILED
. Using these action types will cause a warning to be logged, and will conflict with an upcoming update to the library.
New Features
-
The
resourceType
is now stored on the resource slice. -
There are two new action types for directly modifying resource data independent from requests:
UPDATE_RESOURCES
andDELETE_RESOURCES
.
Deprecations
- Using the
resourceName
property on actions. UseresourceType
instead.
redux-resource-xhr@4.0.0
Migration Guide
Breaking Changes
-
The library now sets HTTP status codes onto Request Objects by default. The HTTP Status Codes plugin is no longer nececessary for this functionality.
-
HTTP status codes are no longer wiped when a request becomes pending
New Features
- You can now pass
requestProperties
to your actions. These are additional properties that will be added to the Request Object in the state.
redux-resource-plugins@3.0.0
Migration Guide
Breaking Changes
- HTTP Status Codes Plugin: Actions without status codes will now set a status code of null rather than 0.
redux-resource-prop-types@4.0.0
Migration Guide
Breaking Changes
- The library has been updated to reflect the changes in
redux-resource@3.0.0
. You should not need to make any changes.
redux-resource-action-creators@2.0.0
Migration Guide
Breaking Changes
- The library has been updated to reflect the changes in
redux-resource@3.0.0
. You should not need to make any changes.
- IDs that were a the number
0
would cause error messages to be logged in certain situations. Also, they would not be deleted when using the built-in delete action type. This issue has been resolved.
-
The file names for the UMD builds were incorrect. Previously, it was
redux-resource-prop-types.min.js
. Now, it isredux-resource-action-creators.min.js
.This change should not impact Webpack, Node, nor Browserify users. It only impacts developers who were using this path directly in their application code.
- This new library that may help you create valid Redux Resource action. For more, see the documentation.
Today's updates include features that make it easier to work with related resources.
upsertResources
andsetResourceMeta
now accept an Object forresources
as well as an Array.
- There is now a new plugin, Included Resources.
- Introduces a new API that provides the user with more control over when actions are dispatched, and the shape of those actions.
- Deprecates the old API. See the migration guide.
- Removes the deprecated
2.x
API.
Bug Fixes
-
All libraries have been updated to fix an issue with the ES Modules build where the Babel helpers were not included in the bundle. The published package versions with this fix are:
redux-resource@2.3.2
redux-resource-xhr@2.1.1
redux-resource-plugins@2.0.2
redux-resource-prop-types@3.0.1
Bug Fixes
- The warning message when a
request
orresources
attribute is missing from an action has been fixed. Previously, it would suggest that adding a"list"
would resolve the warning, but that's not true!
New Features
- You can now customize the query string serializer by using the
qsStringify
andqsStringifyOptions
XHR options. For more, refer to the documentation.
Breaking Changes
resourceIdsPropType
has been removedslicePropType
has been removedresourcesPropType
has been removed
New Features
- Several new prop types that you can use to build better replacements for the above deletions. For more, refer to the migration guide.
New Features
getStatus
now supports bracket notation for pathing. For instance,getStatus(state, 'books.resources[24].readStatus')
.
Changes
- A README has been added to the npm package.
Changes
- A README has been added to the npm packages.
New Features
getResources
has a new signature that only accepts two arguments. This makes it easier to usegetResources
in applications that aren't usingcombineReducers
. Read more on the API documentation page.
Deprecations
- The old API of
getResources
that accepts three arguments.
New Features
getResources
now accepts a filter function. Read more on the API documentation page.
Note: No changes were made from
2.0.0-beta1
.
Here is a summary of changes between 1.0.x and 2.0.0:
Breaking Changes
getResources
now returns resources from lists, rather than requests.- The
labels
section of a slice has been renamed to berequests
. - The library has been renamed from
resourceful-redux
to beredux-resource
New Features
- The
resourceful-redux
library now supports lists, which separates two use cases both previously managed bylabels
. Lists are designed to track ordered collections of resources, like results from a search or a 'most popular books'. Labels are now able to focus solely on named requests that aren't necessarily tied to specific resources (e.g. to track the creation of new resources that may not have IDs yet). For more info, refer to #187 or read further in our docs. - Loading Redux Resource in browser global environments (when you're not using Webpack, Browserify, Rollup, or another bundler like these) now works.
- The reset plugin now supports resetting a list and/or a request, or the entire state slice.
Bug Fixes
getResources
now works properly.
Breaking Changes
getResources
now returns resources from lists, rather than requests.- The
labels
section of a slice has been renamed to berequests
. - The library has been renamed from
resourceful-redux
to beredux-resource
New Features
- Loading Redux Resource in browser global environments (when you're not using Webpack, Browserify, Rollup, or another bundler like these) now works.
- The reset plugin now supports resetting a list and/or a request, or the entire state slice.
New Features
- The
resourceful-redux
library now supports lists, which separates two use cases both previously managed bylabels
. Lists are designed to track ordered collections of resources, like results from a search or a 'most popular books'. Labels are now able to focus solely on named requests that aren't necessarily tied to specific resources (e.g. to track the creation of new resources that may not have IDs yet). For more info, refer to #187 or read further in our docs.
New Features
- The
resourceful-xhr
library now supports an alternative API that allows for better chaining of requests. For more, refer to issue #190. The old API is still supported, but it will be removed in resourceful-xhr@2.0.0.
Breaking Changes
- The old API of
resourceful-xhr@1.x
has been removed. Only the API introduced inresourceful-xhr@1.2.0
is now available.
The resourceful-action-creators
library has been renamed to resourceful-xhr
.
New Features
- All action creators now accept a second, optional argument
callback(err, res, body)
that is invoked after the XHR is complete anddispatch()
events trigged.
v1.0.1 (8/18/17)
Bug Fixes
- Fixes an issue where apps bundled with Webpack 1 or CommonJS were always in development mode.
v1.0.0 (8/3/17)
- No changes. This release marks the stability of the API.
v0.5.0 (7/21/17)
New Features
resourceful-plugins
: A new library has been added,resourceful-plugins
. This is a collection of of common plugins that you can use for your CRUD apps.
v0.4.0 (7/21/17)
Changes
- More warnings in development mode should help catch mistakes
Breaking Changes
- Redux@3.x is now a peerDependency of Resourceful Redux, Resourceful Action Creators, and Resourceful Prop Types
resourceful-action-creators
: All end actions now always pass theres
objectresourceful-action-creators
: The actions now pass astatusCode
property, which represents the current status code of the request.
Bug Fixes
resourceful-action-creators
: Thexhr
object will now be returned when using the shorthand action creators (such asreadResources
).
v0.3.0 (7/11/17)
Changes
- Smaller build file-size
- There is now an ES modules export
- New warnings will be emitted in dev mode to catch errors when using the API
Breaking Changes
- Developer warnings will now use
console.error
, rather thanconsole.warn
Bug Fixes
- Resources without an ID will no longer set metadata on the key
undefined
withinslice.meta
- Non-string labels will be ignored
v0.2.0 (7/9/17)
Changes
- Resourceful Redux will now log warnings in more situations where you might be making mistakes to help you out.
v0.1.2 (7/9/17)
Bug Fixes
- Non-success CRUD actions will now ensure that the resource's metadata includes the initial metadata (gh-103)
v0.1.1 (7/9/17)
Bug Fixes
- Successful CRUD operations no longer squash the status of other CRUD operations within resource metadata (gh-100)
v0.1.0 (7/8/17)
Breaking Changes
- The plugin argument signature has changed. Refer to the documentation for more.
- The Resourceful Prop Types no longer include
isRequired
by default. It is now opt in.
Bug Fixes
- In Resourceful Action Creators, the shortcut methods for the wrapped
xhr
(such asxhr.get
) now accept all of the same signatures as thexhr
lib. - Fixed a
console.warn
in Resourceful Redux that wasn't warning when it should have been warning.
v0.0.14 (7/6/17)
Bug Fixes
-
The Action Creators extension will now return the
resources
array that you pass as options when a successful response is received from the backend without a response body. -
The name of the delete metadata has now been normalized as
deleteStatus
.
v0.0.13 (7/6/17)
- No changes.
v0.0.12 (7/6/17)
- No changes. There was an issue with the deploy of 0.0.11 that's been fixed.
v0.0.11 (7/5/17)
Breaking Changes
- Resourceful Action Creators will no longer throw errors. Instead, it will log warnings to the console.
Bug Fixes
- Warnings will only be logged when a resources array is missing from an action completely, but not when it is present but empty.
v0.0.10 (7/4/17)
Breaking Changes
-
Resourceful Action Creators and Resourceful Prop Types are no longer included with the
resourceful-redux
npm package. They may be reintroduced, but there were too many bugs with the implementation being used. You can now install each collection of extras from npm directly. -
New warning messages and Errors will be thrown when common mistakes are made when using the API.
Bug Fixes
- Resourceful Action Creators will now dispatch the correct actions for successful actions.
0.0.9 (6/29/17)
Breaking Changes
- The
resources
Array is now an Object. This will only be breaking if you're accessing or modifying theresources
Array directly. If you're usinggetResources
for accessing resources, andupsertResources
for updating resources, then this change will not be breaking.
0.0.8 (6/27/17)
Bug Fixes
- Fixes a bug that would cause errors to be thrown when using Resourceful Action Creators
- Fixes the location of the Resourceful Action Creators and Resourceful Prop Types in the npm module
0.0.7 (6/24/17)
New Features
- Two extras have been added to the
npm
package: Resourceful Prop Types and Resourceful Action Creators.
0.0.6 (6/22/17)
New Features
- Adds
getResources
method
0.0.5 (6/20/17)
Bug Fixes
- Fixed a bug where
pending
was set totrue
anytimetreatNullAsPending
wastrue
when callinggetStatus
.
0.0.4 (6/19/17)
New Features
- A "null" property is now included in the object returned from
getStatus
, which can be used to check if the request status is"NULL"
.
0.0.3 (6/19/17)
- Passing an empty resources array in an action creator with
mergeLabelIds: false
will now clear the label's IDs array.
0.0.2 (6/18/17)
- First release
This library began as a fork of redux-simple-resource v1.0.0.