# What changed in @floating-ui/react-dom

> 11 changes in @floating-ui/react-dom 2 from its official release notes, upgrade guides and advisories: 5 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/npm/@floating-ui/react-dom/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @floating-ui/react-dom 2

### Breaking changes

- The deprecated top-level floating ref setter is removed; use refs.setFloating instead. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- The deprecated top-level reference ref setter is removed; use refs.setReference instead. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- The whileElementsMounted type now requires a cleanup function. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- The default x coordinate is 0 instead of null; use isPositioned to determine whether the floating element has been positioned. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- The default y coordinate is 0 instead of null; use isPositioned to determine whether the floating element has been positioned. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)

### New APIs and options

- useFloating accepts an optional floating element in elements for external element synchronization in the hook. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- useFloating accepts an optional reference element in elements for external element synchronization in the hook. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
- useFloating returns a floatingStyles object with pre-configured positioning styles for the majority of cases. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)

### Fixes and other changes

- Optional properties now support explicit undefined when exactOptionalPropertyTypes is enabled. (2.1.9) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.1.9)
- Reactive middleware wrappers no longer produce a duplicate `options` key warning. (2.1.8) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.1.8)
- The arrow element option's type now allows null. (2.0.0) — [release notes](https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui/react-dom%402.0.0)
