react-remote-resource
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "react-remote-resource", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Intuitive remote data management in React", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,3 @@ # react-remote-resource | ||
Whenever a resource is used it will check the internal cache for a valid data entry. If a valid entry is found, the resource will return the data from the cache and the data is ready to use. If no valid entry is found, the `load` function, which returns a Promise, will be invoked and thrown. The nearest `RemoteResourceBoundary`, using `Suspsense` under the hood, will catch the Promise and render the `fallback` until all outstanding Promises resolve. If any of the Promises reject, the `RemoteResourceBoundary` calls `renderError` and `onLoadError` (if provided) otherwise it returns the `children`. This provides an intuitive way to use data from remote resources throughout your app without over-fetching, or the headache and boilerplate of Redux or some other data management library. | ||
Whenever a resource is used it will check the internal cache for a valid data entry. If a valid entry is found, the resource will return the data from the cache and the data is ready to use. If no valid entry is found, the `load` function, which returns a Promise, will be invoked and thrown. The nearest `RemoteResourceBoundary`, using `Suspense` under the hood, will catch the Promise and render the `fallback` until all outstanding Promises resolve. If any of the Promises reject, the `RemoteResourceBoundary` calls `renderError` and `onLoadError` (if provided) otherwise it returns the `children`. This provides an intuitive way to use data from remote resources throughout your app without over-fetching, or the headache and boilerplate of Redux or some other data management library. | ||
@@ -215,7 +215,3 @@ ## Getting Started | ||
```jsx | ||
import { | ||
createRemoteResouce, | ||
useEntry, | ||
useAutoSave | ||
} from "react-remote-resource"; | ||
import { useEntry, useAutoSave } from "react-remote-resource"; | ||
import { savePost, postsResource } from "../resources/posts"; | ||
@@ -274,7 +270,3 @@ | ||
```jsx | ||
import { | ||
createRemoteResouce, | ||
useEntry, | ||
useAutoSave | ||
} from "react-remote-resource"; | ||
import { useEntry, useAutoSave } from "react-remote-resource"; | ||
import { savePost, usePost } from "../resources/posts"; | ||
@@ -281,0 +273,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
332051
329