New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@szhsin/react-menu

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@szhsin/react-menu - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

11

dist/index.js

@@ -376,2 +376,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var menuItemsCount = React.useRef(0);
var prevOpen = React.useRef(isOpen);

@@ -804,3 +805,11 @@ var _useReducer = React.useReducer(hoverIndexReducer, initialHoverIndex),

React.useLayoutEffect(function () {
if (animation && isMounted) setClosing(!isOpen);
if (animation && isMounted) {
if (isOpen) {
setClosing(false);
} else if (isOpen !== prevOpen.current) {
setClosing(true);
}
}
prevOpen.current = isOpen;
}, [animation, isMounted, isOpen]);

@@ -807,0 +816,0 @@ React.useEffect(function () {

@@ -373,2 +373,3 @@ import React, { useState, useReducer, useCallback, useMemo, useContext, useRef, useLayoutEffect, useEffect } from 'react';

var menuItemsCount = useRef(0);
var prevOpen = useRef(isOpen);

@@ -801,3 +802,11 @@ var _useReducer = useReducer(hoverIndexReducer, initialHoverIndex),

useLayoutEffect(function () {
if (animation && isMounted) setClosing(!isOpen);
if (animation && isMounted) {
if (isOpen) {
setClosing(false);
} else if (isOpen !== prevOpen.current) {
setClosing(true);
}
}
prevOpen.current = isOpen;
}, [animation, isMounted, isOpen]);

@@ -804,0 +813,0 @@ useEffect(function () {

4

package.json
{
"name": "@szhsin/react-menu",
"version": "0.9.0",
"version": "0.9.1",
"description": "React menu components",

@@ -23,3 +23,3 @@ "author": "Zheng Song",

"test:watch": "react-scripts test --env=jsdom",
"predeploy": "cd example && npm install && npm run build",
"predeploy": "cd example && npm run build",
"deploy": "gh-pages -d example/build"

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

@@ -1,5 +0,7 @@

# @szhsin/react-menu
# React-Menu
> React menu components
**[Live examples and documentation](https://szhsin.github.io/react-menu/)**
[![NPM](https://img.shields.io/npm/v/@szhsin/react-menu.svg)](https://www.npmjs.com/package/@szhsin/react-menu)

@@ -6,0 +8,0 @@

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