摘要:
import React from "react"; export default function debounce<T = HTMLInputElement>( fn: (ev: React.ChangeEvent<T>) => void, ms = 500 ) { let timeId: No 阅读全文
posted @ 2022-05-11 17:46
Rustln
阅读(121)
评论(0)
推荐(0)
摘要:
让 await 和 try catch 更简洁: /** * @param { Promise } promise * @param { Object= } errorExt - Additional Information you can pass to the err object * @ret 阅读全文
posted @ 2022-05-09 09:39
Rustln
阅读(54)
评论(0)
推荐(0)
摘要:
插件: Auto Rename TagC#C# XML Documentation CommentsChinese 简体中文Code Spell CheckerCodeLLDBcratesError LensESLintEven Better TOMLfilesizeFlow Language Su 阅读全文
posted @ 2022-05-08 19:51
Rustln
阅读(118)
评论(0)
推荐(0)
摘要:
通常需要根据请求地址设置某个导航或者按钮选中状态,react-router-dom 提供了 NavLink 组件,但是不够灵活,所以编写 useRouteMatch hook 来实现手动控制,使用如下: function Cmp(){ const isActive = useRouteMatch(链 阅读全文
posted @ 2022-05-07 15:40
Rustln
阅读(886)
评论(0)
推荐(0)
摘要:
{ "workbench.iconTheme": "material-icon-theme", "security.workspace.trust.untrustedFiles": "open", "[typescriptreact]": { "editor.defaultFormatter": " 阅读全文
posted @ 2022-05-04 16:06
Rustln
阅读(167)
评论(0)
推荐(0)