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

recoil-nexus

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recoil-nexus - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

16

build/RecoilNexus.js

@@ -6,5 +6,4 @@ import { useRecoilCallback } from 'recoil';

var snapshot = _a.snapshot;
return function (_a) {
var atom = _a.atom, resolve = _a.resolve;
resolve(snapshot.getPromise(atom));
return function (atom) {
return snapshot.getPromise(atom);
};

@@ -14,6 +13,3 @@ }, []);

var set = _a.set;
return function (_a) {
var atom = _a.atom, value = _a.value;
set(atom, value);
};
return set;
}, []);

@@ -23,9 +19,7 @@ return null;

export function getRecoil(atom) {
return new Promise(function (resolve) {
nexus.get({ atom: atom, resolve: resolve });
});
return nexus.get(atom);
}
export function setRecoil(atom, value) {
nexus.set({ atom: atom, value: value });
nexus.set(atom, value);
}
//# sourceMappingURL=RecoilNexus.js.map
{
"name": "recoil-nexus",
"version": "0.2.5",
"version": "0.2.6",
"description": "A small Typescript package to access your Recoil atoms outside of React components.",

@@ -5,0 +5,0 @@ "main": "build/RecoilNexus.js",

@@ -5,4 +5,2 @@ # R E C O I L - N E X U S

#### Working with Recoil up to version 0.1.3
If you have been using **[recoil](https://recoiljs.org/)** for a while, you might have faced that outside React Components it's not possible to get or update values from atoms.

@@ -91,3 +89,3 @@

Original credits to [VeepCream](https://github.com/VeepCream)'s [recoil-outside](https://www.npmjs.com/package/recoil-outside) Javascript implementation.
In this Typescript package, I decided to remove RxJS and rely on promises only.
Kudos to [VeepCream](https://github.com/VeepCream)'s [recoil-outside](https://www.npmjs.com/package/recoil-outside) original idea and Javascript implementation.
In this Typescript port/enhancement, I decided to remove RxJS and rely on native Recoil promises only.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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