react-vant-nova 1.1.0-test → 1.1.1-test

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.

Potentially problematic release.


This version of react-vant-nova might be problematic. Click here for more details.

@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useState } from 'react';
2
+ import { useCallback, useState } from 'react';
3
+ import { useIsomorphicLayoutEffect } from '../hooks';
3
4
  import { extend, isObject } from '../utils';
4
5
  import { resolveContainer } from '../utils/dom/getContainer';
5
6
  import { lockClick } from './lock-click';
@@ -77,7 +78,7 @@ const ToastObj = p => {
77
78
  update.config = useCallback(nextState => {
78
79
  setState(prev => typeof nextState === 'function' ? Object.assign(Object.assign({}, prev), nextState(prev)) : Object.assign(Object.assign({}, prev), nextState));
79
80
  }, [setState]);
80
- useEffect(() => {
81
+ useIsomorphicLayoutEffect(() => {
81
82
  setVisible(true);
82
83
  if (!allowMultiple) syncClear();
83
84
  toastArray.push(internalOnClosed);
@@ -18,6 +18,7 @@ function _jsxRuntime() {
18
18
  };
19
19
  return data;
20
20
  }
21
+ var _hooks = require("../hooks");
21
22
  var _utils = require("../utils");
22
23
  var _getContainer = require("../utils/dom/getContainer");
23
24
  var _lockClick = require("./lock-click");
@@ -97,7 +98,7 @@ const ToastObj = p => {
97
98
  update.config = (0, _react().useCallback)(nextState => {
98
99
  setState(prev => typeof nextState === 'function' ? Object.assign(Object.assign({}, prev), nextState(prev)) : Object.assign(Object.assign({}, prev), nextState));
99
100
  }, [setState]);
100
- (0, _react().useEffect)(() => {
101
+ (0, _hooks.useIsomorphicLayoutEffect)(() => {
101
102
  setVisible(true);
102
103
  if (!allowMultiple) syncClear();
103
104
  toastArray.push(internalOnClosed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-vant-nova",
3
- "version": "1.1.0-test",
3
+ "version": "1.1.1-test",
4
4
  "description": "React Mobile UI Components based on Vant UI (兼容 React 19+,新增轻量 Table 组件)",
5
5
  "keywords": [
6
6
  "ui",