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],
);