@basic-ui/material 1.0.0-alpha.28 → 1.0.0-alpha.29

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.
@@ -4856,15 +4856,11 @@ const StackProvider = ({
4856
4856
  maxSize = 3
4857
4857
  }) => {
4858
4858
  const onAddItemRef = react$1.useRef(null);
4859
-
4860
- function onAddItem(element) {
4861
- onAddItemRef.current?.(element);
4862
- }
4863
-
4859
+ const value = react$1.useMemo(() => ({
4860
+ addItem: element => onAddItemRef.current?.(element)
4861
+ }), []);
4864
4862
  return /*#__PURE__*/jsxRuntime.jsxs(StackContext.Provider, {
4865
- value: {
4866
- addItem: onAddItem
4867
- },
4863
+ value: value,
4868
4864
  children: [children, /*#__PURE__*/jsxRuntime.jsx(StackContent, {
4869
4865
  gap: gap,
4870
4866
  placement: placement,