use-counterIncrement/decrement state within given boundariesImportimport { useCounter } from '@asuikit/hooks';SourceView source codeDocsEdit this pagePackage@asuikit/hooksUsageCount: 0IncrementDecrementResetSet 5import { Group, Button, Text } from '@asuikit/core';import { useCounter } from '@asuikit/hooks'; function Demo() { const [count, handlers] = useCounter(0, { min: 0, max: 10 }); return ( <> <Text>Count: {count}</Text> <Group position="center"> <Button onClick={handlers.increment}>Increment</Button> <Button onClick={handlers.decrement}>Decrement</Button> <Button onClick={handlers.reset}>Reset</Button> <Button onClick={() => handlers.set(5)}>Set 5</Button> </Group> </> );}Definitionfunction useCounter( initialValue?: number, options?: Partial<{ min: number; max: number; }>): [ number, { increment: () => void; decrement: () => void; set: (value: number) => void; reset: () => void; }];Go backUsage with Vite – GuidesUp nextuse-debounced-state – @asuikit/hooksTable of contentsUsageDefinitionBuild fully functional accessible web applications faster than everAboutContributeAbout MantineChangelogReleasesCommunityChat on DiscordFollow on TwitterFollow on GitHubGitHub discussionsProjectMantine UIDocumentationGitHub organizationnpm organizationBuilt by Vitaly Rtishchev and these awesome peopleJoin Discord communityFollow Mantine on Twitter