ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    TypeScript Record 用法

    Jul 8, 20221 min read
    type Scopes = Record<string, Registry>;
    

    等价于创建了一个 键类型为string ,值类型为Reistry的类型

    等价{[k:string]:Registry}
    

    相关文章

    Next.js 移除所有 console

    在Next.js配置中启用`removeConsole`选项并排除`error`,将移除除错误日志外的所有控制台输出。

    Antd 函数式Modal

    该代码片段展示了一个使用Ant Design的Modal组件实现的React函数式重置确认对话框,用于确认用户是否重置文本和样式。

    React Antd Dropdown Menu Item Demo

    该代码演示了如何使用React和Ant Design的Dropdown组件创建一个包含"关于"、"版本"、"文档"和"问题"选项的下拉菜单。

    Vercel Edge Function 数据预取和预加载的实现

    Vercel Edge Function 通过定义函数、实现数据预取和预加载逻辑、应用到路由以及配置预取和预加载规则,提升页面加载速度和用户体验。

    Next.js Font Optimization Deep Dive into nextfont Component

    Next.js 13+ introduces the `next/font` component to solve common font-related challenges like layout shifts, slow loading, and performance issues by optimizing font handling and ensuring seamless transitions.