Snippets
Collection of useful code snippets.
Collection of useful code snippets.
How to create main picture + bottom thumbnails design with Grid.
Use grid to create sidebar layout.
Create a fixed navbar.
A simple git cheatsheet.
JavaScript utilities in single line of code
Allow users to pass in a tag name prop to a component as a string.
Portal 提供了一種將子元件渲染到存在於父元件以外的 DOM 中的方法。
React for nprogress.
Slider allow users to make selections from a range of values.
Tab component with animated highlight on hover.
This hook allows you to debounce any fast changing value.
Avoid weird SSR issues with this handy React hook. Know whether you're rendering on the client or server!
使用 IntersectionObserver API 用於檢測元素是否在螢幕可見範圍內,並且提供相關的 callback。
這個 hook 可以檢測指定元素之外的點擊,適用於 Modal 或 Dropdown menus 的元件在點擊元件以外的元素時自動關閉。
This hook allows you to give function runs only once at a specified period of time.
Handy syntactic sugar around useState, for toggling a boolean value on and off.