Packages

@floating-ui/react-dom

2.1.9 · 11 Jul 2026MIT112.9M / weekRepositoryHomepagenpmAtom feed

Your version

2.1.0

20 May 2024Where it was published

2.1.9 is the newest release of 2.x.

In short

1 new

Release note

Minor Changes

  • Support dependency array as a second argument of all middleware. This ensures stateful options can be kept reactive when making them derived (passing a function that returns the options):

const [value, setValue] = React.useState(0);

const offset1 = offset(value); // reactive
const offset2 = offset(() => value); // NOT reactive
const offset3 = offset(() => value, [value]); // reactive

This also includes size's apply function:

size(
  {
    apply() {
      value; // reactive
    },
  },
  [value],
);