usehooks-ts is a tiny library without any dependencies, ensuring a lean and efficient solution. Type-Safe Catch compile-time errors with ease and unlock strong typing benefits. Tree-Shakable Eliminating unused
import { useToggle } from 'usehooks-ts' export default function Component() { const [value, toggle, setValue] = useToggle() // Just an example to use "setValue" const customToggle = () => { setValue((x: boolean) => !x) } return ( <> Value is {value.toString()} { setV...
git clone https://github.com/{your_username}/usehooks-ts.git cd usehooks-ts pnpm installCreate or update a new hook# This command generates boilerplate for new hooks. # Skip if updating an existed hook. pnpm gen-hook # start working pnpm dev # or pnpm dev --filter=usehooks-ts # ...
npm iusehooks-ts Created byJulien Caronand maintained with ️ by an amazingteam of developers. 💫 Introduction useHooks(🔥).ts is a React hooks library, written in Typescript and easy to use. It provides a set of hooks that enables you to build your React applications faster. The ...
git clone https://github.com/{your_username}/usehooks-ts.git cd usehooks-ts npm install ``` Create or update a new hook ``` shell # This command generates boilerplate for new hooks. # Skip if updating an existed hook. npm run plop # Then develop the hook (aka test:watch) npm ru...
Update usehooks-ts to v32 changes: 1 addition & 1 deletion 2 packages/react/package.json Original file line numberDiff line numberDiff line change @@ -50,7 +50,7 @@ "@livekit/components-core": "workspace:*", "@react-hook/latest": "1.0.3", "clsx": "2.1.1", "usehooks-ts":...
hooks useDoubleClick.ts useGlobalErrorHandler.ts useGlobalKeyboardShortcuts.ts useHeightOverride.tsx useHistory.ts useIFrameFocuser.ts useIsVisible.ts useLinkHandler.ts useProcessesRef.tsx useResizeObserver.ts useUrlLoader.ts useWebGPUCheck.ts useWorker.ts pages public scripts styles utils .dockerignore...
hooks / useNav.ts useNav.ts4.68 KB 一键复制编辑原始数据按行查看历史 xiaoming提交于22天前.refactor: 升级tailwindcss至v4版本,带来更快的构建速度、更简化的安装和配置、提供专属vite插件 (#1203) import{storeToRefs}from"pinia"; import{getConfig}from"@/config"; ...
hooks / use-cascader-options.ts use-cascader-options.ts234 Bytes 一键复制编辑原始数据按行查看历史 wailen提交于4年前.feat: update cascader component 123456789101112 /** * 处理传入options数据 */ import{ref,watch}from'vue'; import{CascaderProps}from'../src/cascader-types' ...
-写一个防抖(要用ts标注类型) -写一个hooks对useState进行防抖处理 -写一个扁平化数组的函数 -git怎么使用的,git的rebase了解过吗 -css的tailwind用过吗 -用什么搜索引擎 -如何学习前端的 发布于 2024-01-09 17:16・IP 属地北京 写下你的评论... ...