Declarative data-fetching and caching framework for REST APIs with React
Finally to version 1.0! There is nothing major in this release that there wasn't in the beta releases. Biggest changes from < 1.0 repeated here:
getResources
executor function now takes the resource keys as the first argument and props as the second.data
-> params
, since the object is used to serialize query parameters (GET) or body parameters (POST/PUT/PATCH/DELETE), not server dataattributes
-> data
, for seeding server data in the modelurl
methods now get called with the options
object from the resource confighaveAllLoaded
, areAnyLoading
, and haveAnyErrored
, respectively, in order to avoid clashing with properties returned by useResources
status
option is now removed from withResources
and will get passed down as props by default just as useResources
doeswithResources
now uses useResources
under the hood1.0.0 Beta release! Not too many external changes from the alpha version, but:
status
option is now removed from withResources
and will get passed down as props by default just as useResources
doeswithResources
now uses useResources
under the hood1.0.0 Beta release! Not too many external changes from the alpha version, but:
data
-> params
, since the object is used to serialize query parameters (GET) or body parameters (POST/PUT/PATCH/DELETE), not server dataattributes
-> data
, for seeding server data in the modelurl
methods now get called with the options
object from the resource configstatus
option is now removed from withResources
and will get passed down as props by default just as useResources
doeswithResources
now uses useResources
under the hood1.0.0 Beta release! Not too many external changes from the alpha version, but:
data
-> params
, since the object is used to serialize query parameters (GET) or body parameters (POST/PUT/PATCH/DELETE), not server dataattributes
-> data
, for seeding server data in the modelurl
methods now get called with the options
object from the resource configstatus
option is now removed from withResources
and will get passed down as props by default just as useResources
doeswithResources
now uses useResources
under the hoodMajor changes prepping the 1.0 release, most notably removing all dependencies.
getResources
executor function now takes the resource keys as the first argument and props as the second.haveAllLoaded
, areAnyLoading
, and haveAnyErrored
, respectively, in order to avoid clashing with properties returned by useResources
Uses a lighter version of Schmackbone with no Router or History modules shipped, as well as no two-way data binding.
adds isOrWillBeLoading for React.memo performance optimizations.
Adds support for modularized Schmackbone while also modularizing itself. Everything now exported from the top-level index.js
file, including all helper modules. ie:
// before
import ModelCache from 'resourcerer/model-cache';
import * as request from 'resourcerer/request';
import {hasLoaded} from 'resourcerer/utils';
// after
import {hasLoaded, ModelCache, request} from 'resourcerer';