🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

r-custom-hooks

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r-custom-hooks - npm Package Compare versions

Comparing version

to
0.1.19

4

dist/hooks/useHistoricalState/index.d.ts
import { ReturnValue } from './types';
export declare const useHistoricalState: <T extends unknown>(defaultValue: T, { capacity }?: {
capacity?: number | undefined;
}) => ReturnValue<T>;
export declare const useHistoricalState: <T extends unknown>(defaultValue: T, capacity?: number) => ReturnValue<T>;
export default useHistoricalState;

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

const react_1 = require("react");
const useHistoricalState = (defaultValue, { capacity = 10 } = {}) => {
const useHistoricalState = (defaultValue, capacity = Number.POSITIVE_INFINITY) => {
const [value, setValue] = (0, react_1.useState)(defaultValue);

@@ -9,0 +9,0 @@ const historyRef = (0, react_1.useRef)([value]);

{
"name": "r-custom-hooks",
"version": "0.1.17",
"version": "0.1.19",
"description": "Predefined custom react hooks",

@@ -5,0 +5,0 @@ "files": [