Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-remote-resource

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-remote-resource - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc