react-spring-bottom-sheet icon indicating copy to clipboard operation
react-spring-bottom-sheet copied to clipboard

TypeError: Cannot read properties of undefined (reading 'getValue')

Open shirinapr opened this issue 1 year ago • 7 comments

My code:

import { useState } from 'react';
import { BottomSheet } from 'react-spring-bottom-sheet';
import 'react-spring-bottom-sheet/dist/style.css';

const Modal = () => {
  const [open, setOpen] = useState(false);

  return (
    <>
      <button onClick={() => setOpen(true)}>
        Open
      </button>
      <BottomSheet open={open}>My awesome content here</BottomSheet>
    </>
  );
};

export default Modal;
Call Stack
eval
node_modules\react-spring\web.js (508:0)
Array.map
<anonymous>
AnimatedInterpolation.getValue
node_modules\react-spring\web.js (508:0)
AnimatedStyle.getValue
node_modules\react-spring\web.js (173:0)
AnimatedProps.getValue
node_modules\react-spring\web.js (173:0)
eval
node_modules\react-spring\web.js (303:0)
renderWithHooks
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (10730:0)
updateForwardRef
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (14715:0)
beginWork$1
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (17415:0)
beginWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (25701:0)
performUnitOfWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24552:0)
workLoopSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24268:0)
renderRootSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24223:0)
recoverFromConcurrentError
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (23451:0)
performSyncWorkOnRoot
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (23712:0)
flushSyncWorkAcrossRoots_impl
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (9998:0)
flushSyncWorkOnAllRoots
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (9956:0)
processRootScheduleInMicrotask
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (10100:0)
eval
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (10271:0)

shirinapr avatar Feb 08 '24 02:02 shirinapr

@shirinapr I had the same issue, solution was to downgrade to 3.5.0-alpha.0

gizmo49 avatar Feb 08 '24 23:02 gizmo49

@shirinapr I had the same issue, solution was to downgrade to 3.5.0-alpha.0

Thanks for your response, ultimately I decided to go with another package.

shirinapr avatar Feb 15 '24 23:02 shirinapr

@shirinapr I had the same issue, solution was to downgrade to 3.5.0-alpha.0

Thanks for your response, ultimately I decided to go with another package.

What is your advice for another package?

erbilozum avatar Feb 23 '24 02:02 erbilozum

@shirinapr I had the same issue, solution was to downgrade to 3.5.0-alpha.0

Thanks for your response, ultimately I decided to go with another package.

What is your advice for another package?

The maintainer works at Vercel and Shadcn/ui uses it too.

https://github.com/emilkowalski/vaul?tab=readme-ov-file

ReangeloJ avatar Mar 12 '24 12:03 ReangeloJ

@shirinapr I had the same issue, solution was to downgrade to 3.5.0-alpha.0

Thanks for your response, ultimately I decided to go with another package.

What is your advice for another package?

I tried react-modal-sheet, it works fine.

shirinapr avatar May 02 '24 11:05 shirinapr

@shirinapr Disable React Strict Mode

adnan-smlatic avatar Jul 13 '24 21:07 adnan-smlatic