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

victory-stack

Package Overview
Dependencies
Maintainers
16
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-stack - npm Package Compare versions

Comparing version 36.8.1 to 36.8.2

6

CHANGELOG.md
# victory-stack
## 36.8.2
### Patch Changes
- Assign merged props to a const instead of modifying initialProps ([#2718](https://github.com/FormidableLabs/victory/pull/2718))
## 36.8.1

@@ -4,0 +10,0 @@

19

es/victory-stack.js

@@ -31,5 +31,6 @@ import _isEmpty from "lodash/isEmpty";

var VictoryStackBase = function (initialProps) {
// eslint-disable-next-line no-use-before-define
var role = VictoryStack.role;
initialProps = _objectSpread(_objectSpread({}, defaultProps), initialProps);
var propsWithDefaults = React.useMemo(function () {
return _objectSpread(_objectSpread({}, defaultProps), initialProps);
}, [initialProps]);

@@ -41,3 +42,3 @@ var _Hooks$useAnimationSt = Hooks.useAnimationState(),

var props = getProps(initialProps);
var props = getProps(propsWithDefaults);
var modifiedProps = Helpers.modifyProps(props, fallbackProps, role);

@@ -96,4 +97,4 @@ var eventKey = modifiedProps.eventKey,

var userProps = React.useMemo(function () {
return UserProps.getSafeUserProps(initialProps);
}, [initialProps]);
return UserProps.getSafeUserProps(propsWithDefaults);
}, [propsWithDefaults]);
var container = React.useMemo(function () {

@@ -111,11 +112,11 @@ if (standalone) {

}, [props]);
var previousProps = Hooks.usePreviousProps(initialProps);
var previousProps = Hooks.usePreviousProps(propsWithDefaults);
React.useEffect(function () {
// This is called before dismount to keep state in sync
return function () {
if (initialProps.animate) {
setAnimationState(previousProps, initialProps);
if (propsWithDefaults.animate) {
setAnimationState(previousProps, propsWithDefaults);
}
};
}, [setAnimationState, previousProps, initialProps]);
}, [setAnimationState, previousProps, propsWithDefaults]);

@@ -122,0 +123,0 @@ if (!_isEmpty(events)) {

@@ -48,6 +48,8 @@ "use strict";

var VictoryStackBase = function (initialProps) {
// eslint-disable-next-line no-use-before-define
var role = VictoryStack.role;
initialProps = _objectSpread(_objectSpread({}, defaultProps), initialProps);
var propsWithDefaults = _react.default.useMemo(function () {
return _objectSpread(_objectSpread({}, defaultProps), initialProps);
}, [initialProps]);
var _Hooks$useAnimationSt = _victoryCore.Hooks.useAnimationState(),

@@ -58,3 +60,3 @@ setAnimationState = _Hooks$useAnimationSt.setAnimationState,

var props = getProps(initialProps);
var props = getProps(propsWithDefaults);

@@ -119,4 +121,4 @@ var modifiedProps = _victoryCore.Helpers.modifyProps(props, fallbackProps, role);

var userProps = _react.default.useMemo(function () {
return _victoryCore.UserProps.getSafeUserProps(initialProps);
}, [initialProps]);
return _victoryCore.UserProps.getSafeUserProps(propsWithDefaults);
}, [propsWithDefaults]);

@@ -136,3 +138,3 @@ var container = _react.default.useMemo(function () {

var previousProps = _victoryCore.Hooks.usePreviousProps(initialProps);
var previousProps = _victoryCore.Hooks.usePreviousProps(propsWithDefaults);

@@ -142,7 +144,7 @@ _react.default.useEffect(function () {

return function () {
if (initialProps.animate) {
setAnimationState(previousProps, initialProps);
if (propsWithDefaults.animate) {
setAnimationState(previousProps, propsWithDefaults);
}
};
}, [setAnimationState, previousProps, initialProps]);
}, [setAnimationState, previousProps, propsWithDefaults]);

@@ -149,0 +151,0 @@ if (!(0, _isEmpty2.default)(events)) {

{
"name": "victory-stack",
"version": "36.8.1",
"version": "36.8.2",
"description": "Stack Layout Component for Victory",

@@ -26,4 +26,4 @@ "keywords": [

"react-fast-compare": "^3.2.0",
"victory-core": "^36.8.1",
"victory-shared-events": "^36.8.1"
"victory-core": "^36.8.2",
"victory-shared-events": "^36.8.2"
},

@@ -30,0 +30,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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