stipsan / react-spring-bottom-sheet

Accessible ♿️, Delightful ✨, & Fast 🚀
https://react-spring.bottom-sheet.dev/
MIT License
947 stars 129 forks source link

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

Open shirinapr opened 7 months ago

shirinapr commented 7 months ago

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)
gizmo49 commented 7 months ago

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

shirinapr commented 7 months ago

@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.

erbilozum commented 6 months ago

@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?

ReangeloJ commented 6 months ago

@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

shirinapr commented 4 months ago

@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.

adnan-smlatic commented 2 months ago

@shirinapr Disable React Strict Mode