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

@yamada-ui/use-controllable-state

Package Overview
Dependencies
Maintainers
0
Versions
569
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/use-controllable-state - npm Package Compare versions

Comparing version 1.0.26-dev-20241214144625 to 1.0.26-dev-20241215203956

12

dist/index.js

@@ -30,10 +30,10 @@ "use client"

function useControllableState({
defaultValue: defaultValueProp,
value,
...rest
onChange: onChangeProp,
onUpdate: onUpdateProp = (prev, next) => prev !== next
}) {
var _a;
(_a = rest.onUpdate) != null ? _a : rest.onUpdate = (prev, next) => prev !== next;
const onChange = (0, import_utils.useCallbackRef)(rest.onChange);
const onUpdate = (0, import_utils.useCallbackRef)(rest.onUpdate);
const [defaultValue, setDefaultValue] = (0, import_react.useState)(rest.defaultValue);
const onChange = (0, import_utils.useCallbackRef)(onChangeProp);
const onUpdate = (0, import_utils.useCallbackRef)(onUpdateProp);
const [defaultValue, setDefaultValue] = (0, import_react.useState)(defaultValueProp);
const controlled = value !== void 0;

@@ -40,0 +40,0 @@ const resolvedValue = controlled ? value : defaultValue;

{
"name": "@yamada-ui/use-controllable-state",
"version": "1.0.26-dev-20241214144625",
"version": "1.0.26-dev-20241215203956",
"description": "Yamada UI useControllableState custom hook",

@@ -28,3 +28,3 @@ "keywords": [

"dependencies": {
"@yamada-ui/utils": "1.6.2-dev-20241214144625"
"@yamada-ui/utils": "1.6.2-dev-20241215203956"
},

@@ -31,0 +31,0 @@ "devDependencies": {

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