Skip to content

Instantly share code, notes, and snippets.

View zeyios's full-sized avatar

Zeke zeyios

  • Open to work
  • 19:49 (UTC +08:00)
  • LinkedIn in/zeyqiao
View GitHub Profile
@zeyios
zeyios / useRequestState.md
Last active July 7, 2024 07:58
React request state hooks that support TypeScript seamlessly.

Usage

  1. manage loading state easily
function UserComponent() {
  const [request, isLoading] = useRequestState(fetchData);

  return (
    <div>