github floating-ui/floating-ui @floating-ui/react-native@0.10.6

latest releases: @floating-ui/vue@1.1.1, @floating-ui/vue@1.1.0, @floating-ui/utils@0.2.4...
one month ago

Patch Changes

  • fix(types): re-export all missing core types
  • feat: 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],
);

Don't miss a new floating-ui release

NewReleases is sending notifications on new releases.