You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The status selectors from the URM resource helper are named differently than the status properties returned from the ResourceLoader components.
The URM helper selectors are using the redux-saga-thunk naming (i.e pending, rejected, fulfilled and done) for status selectors. These match the naming convention of the underlying library used redux-saga-thunk. Here is example code of the status selectors returned from a resource helper.
// NOTE the selector namesconst{ pending, rejected, fulfilled, done }=resourceListRead('demo').selectors;
The ResourceLoader components return a status object with properties initial, loading, error, and success`. Here is example code showing the status object returned to the render prop a ResourceLoader component:
constDemoListLoader=()=>(<ResourceListLoaderresource="demo"autoLoad>
// NOTE the status names names
{({status: { loading, error, success, done })=>(<div>Load status example</div>)}</ResourceListLoader>);
Describe the solution you'd like
I prefer the naming used in the ResourceLoader components so I suggest we update the resource helpers to return selectors renamed to match. The selectors would be renamed:
Describe alternatives you've considered
Alternatively we could rename the ResourceLoader components status object. I prefer the ResourceLoader status names to the redux-saga-thunk names. They are more clear imo.
The text was updated successfully, but these errors were encountered:
Feature Request
Is your feature request related to a problem? Please describe.
The status selectors from the URM resource helper are named differently than the status properties returned from the ResourceLoader components.
The URM helper selectors are using the
redux-saga-thunk
naming (i.epending, rejected, fulfilled and done
) for status selectors. These match the naming convention of the underlying library usedredux-saga-thunk
. Here is example code of the status selectors returned from a resource helper.The ResourceLoader components return a status object with properties
initial,
loading,
error, and
success`. Here is example code showing the status object returned to the render prop a ResourceLoader component:Describe the solution you'd like
I prefer the naming used in the ResourceLoader components so I suggest we update the resource helpers to return selectors renamed to match. The selectors would be renamed:
pending
loading
rejected
error
fulfilled
success
done
done
Describe alternatives you've considered
Alternatively we could rename the ResourceLoader components status object. I prefer the ResourceLoader status names to the
redux-saga-thunk
names. They are more clear imo.The text was updated successfully, but these errors were encountered: