@douyinfe/semi-animation-react 2.10.0 → 2.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/src/Animation.js
CHANGED
|
@@ -144,6 +144,12 @@ class Animation extends _react.PureComponent {
|
|
|
144
144
|
forwardInstance
|
|
145
145
|
} = this.props;
|
|
146
146
|
|
|
147
|
+
if (this.animation === null) {
|
|
148
|
+
// didmount/willUnmount may be called twice when React.StrictMode is true in React 18, we need to ensure that this.animation is correct
|
|
149
|
+
this.initAnimation();
|
|
150
|
+
this.bindEvents();
|
|
151
|
+
}
|
|
152
|
+
|
|
147
153
|
if (typeof forwardInstance === 'function') {
|
|
148
154
|
forwardInstance(this.animation);
|
|
149
155
|
}
|
package/lib/es/src/Animation.js
CHANGED
|
@@ -128,6 +128,12 @@ export default class Animation extends PureComponent {
|
|
|
128
128
|
forwardInstance
|
|
129
129
|
} = this.props;
|
|
130
130
|
|
|
131
|
+
if (this.animation === null) {
|
|
132
|
+
// didmount/willUnmount may be called twice when React.StrictMode is true in React 18, we need to ensure that this.animation is correct
|
|
133
|
+
this.initAnimation();
|
|
134
|
+
this.bindEvents();
|
|
135
|
+
}
|
|
136
|
+
|
|
131
137
|
if (typeof forwardInstance === 'function') {
|
|
132
138
|
forwardInstance(this.animation);
|
|
133
139
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-animation-react",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2",
|
|
4
4
|
"description": "motion library for semi-ui-react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"motion",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
29
|
-
"@douyinfe/semi-animation": "2.10.
|
|
30
|
-
"@douyinfe/semi-animation-styled": "2.10.
|
|
29
|
+
"@douyinfe/semi-animation": "2.10.2",
|
|
30
|
+
"@douyinfe/semi-animation-styled": "2.10.2",
|
|
31
31
|
"classnames": "^2.2.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"prop-types": "15.7.2",
|
|
52
52
|
"react-storybook-addon-props-combinations": "^1.1.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "00b27ff43fe6ed5d775d5849bd0adc4c4c5ea231"
|
|
55
55
|
}
|