resourcerer 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/resourcerer.js +10 -8
- package/package.json +3 -3
package/lib/resourcerer.js
CHANGED
|
@@ -213,14 +213,16 @@ export const useResources = (getResources, props) => {
|
|
|
213
213
|
});
|
|
214
214
|
},
|
|
215
215
|
onRequestFailure: (status, [name, config]) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
217
|
+
// request failed, which means this model should not be in the cache. but we still want
|
|
218
|
+
// to // set our model state so that when we go back into a loading state, the empty
|
|
219
|
+
// model is present instead of any previously-loaded model
|
|
220
|
+
setModels(modelAggregator([[name, config]]));
|
|
221
|
+
|
|
222
|
+
loaderDispatch({
|
|
223
|
+
type: LoadingStates.ERROR,
|
|
224
|
+
payload: {name, config, status}
|
|
225
|
+
});
|
|
224
226
|
});
|
|
225
227
|
}
|
|
226
228
|
}).then(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resourcerer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"repository": "github.com/noahgrant/resourcerer",
|
|
5
5
|
"description": "Declarative data-fetching and caching framework for React",
|
|
6
6
|
"keywords": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"whatwg-fetch": "^3.6.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"react": "^16.14.0 || ^17.0.0",
|
|
58
|
-
"react-dom": "^16.14.0 || ^17.0.0"
|
|
57
|
+
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
|
|
58
|
+
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
|
|
59
59
|
}
|
|
60
60
|
}
|