StreakYC / react-float-anchor

React component for positioning an element aligned to another
MIT License
49 stars 5 forks source link

React 18 support? #23

Open wegry opened 2 years ago

wegry commented 2 years ago

With StackBlitz and codesandbox, React 18 is now the default in react templates.

When trying to use react-float-anchor and react-18, Should not happen: portalEl already in page happens in this example from react-menu-list. https://stackblitz.com/edit/react-ts-xqmbow?file=App.tsx when the <input> element is focused.

Macil commented 2 years ago

It seems like the issue is currently specific to Strict Mode in React 18, specifically the new part of it that all components are expected to handle being unmounted and then remounted. I'll update this project to work fully with React 18.

wegry commented 3 months ago

@Macil mind creating a new issue without me tagged on it?

Macil commented 3 months ago

Does unsubscribing from the issue work?

wegry commented 3 months ago

It does not.