You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

awai-react

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awai-react - npm Package Compare versions

Comparing version

to
0.0.1-alpha-2

7

dist/index.js

@@ -12,3 +12,3 @@ 'use strict';

const [state, setState] = react.useState(readable.get);
if (awai.isReadableAsyncState(readable) && state === void 0) {
if (awai.isReadableAsyncState(readable) && readable.get() === void 0) {
throw new Promise((resolve) => readable.events.changed.then(resolve));

@@ -18,7 +18,8 @@ }

let mounted = true;
setState(readable.get());
(async () => {
while (mounted) {
await readable.events.changed;
const newValue = await readable.events.changed;
if (mounted) {
setState(readable.get());
setState(newValue);
}

@@ -25,0 +26,0 @@ }

{
"name": "awai-react",
"version": "0.0.1-alpha-1",
"version": "0.0.1-alpha-2",
"author": "Yuriy Yakym",

@@ -15,3 +15,5 @@ "description": "React hooks for Awai integration",

"scripts": {
"build": "rm -rf dist && rollup -c rollup.config.js"
"build": "rm -rf dist && rollup -c rollup.config.js",
"test": "jest",
"test:watch": "jest --watch"
},

@@ -35,4 +37,8 @@ "repository": {

"devDependencies": {
"@testing-library/react": "^14.0.0",
"@types/jest": "^29.5.3",
"@types/react": "^18.2.16",
"awai": "^0.0.1-alpha-3",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"react": "^18.2.0",

@@ -42,2 +48,3 @@ "rollup": "^3.26.3",

"rollup-plugin-esbuild": "^5.0.0",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"

@@ -44,0 +51,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet