Socket
Socket
Sign inDemoInstall

@chakra-ui/react-use-controllable-state

Package Overview
Dependencies
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/react-use-controllable-state - npm Package Compare versions

Comparing version 0.0.0-dev-20220912133211 to 0.0.0-dev-20220914090509

2

dist/index.cjs.js

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

const value = controlled ? valueProp : uncontrolledState;
const setValue = (0, import_react.useCallback)((next) => {
const setValue = (0, import_react_use_callback_ref.useCallbackRef)((next) => {
const setter = next;

@@ -49,0 +49,0 @@ const nextValue = typeof next === "function" ? setter(value) : next;

// src/index.ts
import { useCallback, useMemo, useState } from "react";
import { useMemo, useState } from "react";
import { useCallbackRef } from "@chakra-ui/react-use-callback-ref";

@@ -21,3 +21,3 @@ function useControllableProp(prop, state) {

const value = controlled ? valueProp : uncontrolledState;
const setValue = useCallback((next) => {
const setValue = useCallbackRef((next) => {
const setter = next;

@@ -24,0 +24,0 @@ const nextValue = typeof next === "function" ? setter(value) : next;

{
"name": "@chakra-ui/react-use-controllable-state",
"version": "0.0.0-dev-20220912133211",
"version": "0.0.0-dev-20220914090509",
"description": "",

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

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