0

I moved and extracted my floating-ui/react-dom code from one project to another project and now I am getting: Unhandled Runtime Error ReferenceError: Cannot access 'placement' before initialization

I do not understand why, the code is identical

here is my sandbox: @floating-ui/react-dom: https://codesandbox.io/p/sandbox/polished-waterfall-ilc51b?file=%2Fpackage.json [ This --> https://ilc51b-3000.preview.csb.app/users/1 the sandbox page URL ]

I am using: "@floating-ui/react-dom": "^0.6.2"

yeln
  • 462
  • 2
  • 10
  • 23
  • 1
    In **components/user/profile/tabs/albums/JustifiedBox.js**, line 64 looks suspicious. You pass `placement` to `updateArrowClass`, but `placement` is not initialized until the `useFloating` function returns. – tromgy Nov 29 '22 at 03:44
  • While providing a link to the code is fine, your question should be self-contained and preferably not rely on external resources to be answered. Please add the relevant code as text directly to the question, and [format it appropriately](https://stackoverflow.com/help/formatting). – juliomalves Dec 11 '22 at 17:25

0 Answers0