@octanejs/mantine-hooks
v0.1.30
Published
Mantine hooks for Octane, ported from @mantine/hooks with Octane-native lifecycle and state hooks.
Keywords
Readme
@octanejs/mantine-hooks
Mantine hooks for Octane. This package ports the complete
@mantine/[email protected] runtime surface to Octane hooks while preserving Mantine's
public names, arguments, return values, and browser behavior.
import { useCounter, useDisclosure } from '@octanejs/mantine-hooks';
export function Controls() @{
const [count, counter] = useCounter(0, { min: 0, max: 10 });
const [opened, disclosure] = useDisclosure(false);
<section>
<button onClick={counter.increment}>{count as string}</button>
<button onClick={disclosure.toggle}>{opened ? 'close' : 'open'}</button>
</section>
}Compatibility
- All runtime exports from
@mantine/[email protected]are present. - Hook implementations use Octane state, effects, refs, memoization, and compiler-injected hook slots.
- DOM subscriptions use native browser events, matching Mantine's underlying behavior.
- React is not a runtime dependency. React type declarations are retained for source-compatible ref, event, and style types.
