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

latest releases: @floating-ui/react@0.26.28, @floating-ui/react-native@0.10.7, @floating-ui/react@0.26.27...
5 months 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.