floatingStyles are missing in the result of useFloating

153 Views Asked by At

i am using "@floating-ui/react": "^0.25.4" and when calling useFloating hook i dont get floatingStyles property/field in the result of the hook call (even though it is not marked as optional in types). The field not only is undefined it just does not exist. I am assuming it is a bug in the library. Any workarounds ?

1

There are 1 best solutions below

0
Guilherme Oderdenge On

I had the same issue. I even could not reproduce it in pristine environments, so it's clearly something tied to my application.

Thing is, what?

All I know is that I've been transiting between different versions of @floating-ui quite a bunch. So I had this epiphany of maybe a conflict and... yes, it was!

What worked for me was deleting my node_modules folder and npm install again.