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

@proscom/ui-react

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proscom/ui-react - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

6

lib/es/hooks/useImmediateState.js

@@ -1,2 +0,2 @@

import { useRef, useState } from 'react';
import { useCallback, useRef, useState } from 'react';
/**

@@ -23,3 +23,3 @@ * Хук, который позволяет при зависимости стейта от пропов

var stateRef = useRef(targetValue);
var setState = function (value) {
var setState = useCallback(function (value) {
stateRef.current =

@@ -30,3 +30,3 @@ typeof value === 'function'

rerender(function (s) { return s + 1; });
};
}, []);
// Отслеживаем изменения targetValue и меняем стейт, если он меняется

@@ -33,0 +33,0 @@ var previousValue = useRef(targetValue);

@@ -40,2 +40,2 @@ /**

*/
export declare function useLiveInput<Value>(onSubmit: (value: Value) => void, delay?: number): (boolean | ((value: Value, useTimeout?: boolean) => void))[];
export declare function useLiveInput<Value>(onSubmit: (value: Value) => void, delay?: number): readonly [boolean, (value: Value, useTimeout?: boolean) => void];

@@ -26,3 +26,3 @@ "use strict";

var stateRef = react_1.useRef(targetValue);
var setState = function (value) {
var setState = react_1.useCallback(function (value) {
stateRef.current =

@@ -33,3 +33,3 @@ typeof value === 'function'

rerender(function (s) { return s + 1; });
};
}, []);
// Отслеживаем изменения targetValue и меняем стейт, если он меняется

@@ -36,0 +36,0 @@ var previousValue = react_1.useRef(targetValue);

@@ -40,2 +40,2 @@ /**

*/
export declare function useLiveInput<Value>(onSubmit: (value: Value) => void, delay?: number): (boolean | ((value: Value, useTimeout?: boolean) => void))[];
export declare function useLiveInput<Value>(onSubmit: (value: Value) => void, delay?: number): readonly [boolean, (value: Value, useTimeout?: boolean) => void];
{
"name": "@proscom/ui-react",
"version": "0.1.8",
"version": "0.1.9",
"description": "Proscom React utilities",

@@ -46,4 +46,3 @@ "author": "Andrew Starostin <a.starostin@proscom.ru>",

"rimraf": "^3.0.2"
},
"gitHead": "ed7b4390de441e41fb4ae7330d0613cd2524ea13"
}
}

@@ -1,2 +0,2 @@

import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import { SetStateAction, useCallback, useRef, useState } from 'react';

@@ -25,3 +25,3 @@ /**

const stateRef = useRef<T>(targetValue);
const setState = (value: SetStateAction<T>) => {
const setState = useCallback((value: SetStateAction<T>) => {
stateRef.current =

@@ -32,3 +32,3 @@ typeof value === 'function'

rerender((s) => s + 1);
};
}, []);

@@ -35,0 +35,0 @@ // Отслеживаем изменения targetValue и меняем стейт, если он меняется

@@ -66,3 +66,3 @@ import { useCallback, useState } from "react";

return [isNewInput, handleSubmit];
return [isNewInput, handleSubmit] as const;
}

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

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