{"id":44642618,"url":"https://github.com/developerrejaul/zustic","last_synced_at":"2026-02-17T18:00:43.117Z","repository":{"id":336291921,"uuid":"1129411804","full_name":"DeveloperRejaul/zustic","owner":"DeveloperRejaul","description":"A fast, minimal state management solution for React ecosystems. Works seamlessly with React, Next.js, and React Native, offering predictable state updates with a tiny footprint.","archived":false,"fork":false,"pushed_at":"2026-02-14T17:19:20.000Z","size":108,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-15T01:28:01.528Z","etag":null,"topics":["expo","hook","nextjs","react","reactnative","redux","state-management","zustand"],"latest_commit_sha":null,"homepage":"https://zustic.github.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeveloperRejaul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-07T04:00:51.000Z","updated_at":"2026-02-14T17:19:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DeveloperRejaul/zustic","commit_stats":null,"previous_names":["developerrejaul/zustic"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DeveloperRejaul/zustic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperRejaul%2Fzustic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperRejaul%2Fzustic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperRejaul%2Fzustic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperRejaul%2Fzustic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeveloperRejaul","download_url":"https://codeload.github.com/DeveloperRejaul/zustic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperRejaul%2Fzustic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29552224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T17:56:56.811Z","status":"ssl_error","status_checked_at":"2026-02-17T17:56:55.544Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expo","hook","nextjs","react","reactnative","redux","state-management","zustand"],"created_at":"2026-02-14T19:04:37.705Z","updated_at":"2026-02-17T18:00:43.110Z","avatar_url":"https://github.com/DeveloperRejaul.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# Zustic\n\n### Lightweight State Management for Modern React Applications\n\n[![npm version](https://img.shields.io/npm/v/zustic.svg)](https://npm.im/zustic)\n[![npm downloads](https://img.shields.io/npm/dm/zustic.svg)](https://npm.im/zustic)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/zustic)](https://bundlephobia.com/result?p=zustic)\n[![License](https://img.shields.io/npm/l/zustic.svg)](LICENSE)\n\nA **fast, minimal state management solution** for React ecosystems. Works seamlessly with React, Next.js, and React Native with predictable state updates and a tiny footprint.\n\n[📖 Documentation](https://zustic.github.io/) · [🐛 Report Bug](https://github.com/DeveloperRejaul/zustic/issues) · [💡 Request Feature](https://github.com/DeveloperRejaul/zustic/issues)\n\n\u003c/div\u003e\n\n---\n\n## Key Features\n\n### Core Features\n- **Ultra-Lightweight** — Only ~500B (gzipped) with zero dependencies\n- **Simple API** — One function (`create`) to manage all your state\n- **React Hooks** — Native React hooks integration with automatic subscriptions\n- **Multi-Platform** — React, React Native, Next.js, and modern frameworks\n- **Reactive Updates** — Automatic re-renders with optimized batching\n- **TypeScript First** — Full type safety with perfect type inference\n- **Production Ready** — Battle-tested in real applications\n\n### Advanced Capabilities\n- **Store Middleware System** — Extend state management with logging, persistence, validation, and more\n- **Query System** — Built-in API data fetching with automatic caching, mutations, and plugins\n- **Automatic Caching** — Smart cache management with configurable timeout\n- **Direct State Access** — `get()` function for reading state outside components\n- **Selective Subscriptions** — Components only re-render when their data changes\n- **Fully Extensible** — Build custom middleware and plugins for any use case\n- **Easy Testing** — Simple to test stores and API queries with middleware and async operations\n- **Plugin System** — Global hooks for authentication, logging, error handling\n- **Framework Agnostic** — Create middleware and plugins once, use everywhere\n\n---\n\n## Installation\n\nChoose your favorite package manager:\n\n```bash\n# npm\nnpm install zustic\n\n# yarn\nyarn add zustic\n\n# pnpm\npnpm add zustic\n```\n\n---\n\n## Why Zustic?\n\n### Size \u0026 Performance\n| Metric | Zustic | Redux | Zustand | Context API |\n|--------|--------|-------|---------|-------------|\n| **Bundle Size** | ~500B | ~6KB | ~2KB | Built-in |\n| **Performance** | Optimized | Good | Optimized | Re-renders |\n| **Dependencies** | 0 | 0 | 0 | 0 |\n\n### Developer Experience\n- **Ultra-Simple API**: Master everything in 5 minutes\n- **Zero Boilerplate**: No actions, reducers, or providers\n- **TypeScript Native**: Perfect type inference out of the box\n- **Great DX**: Intuitive `create()`, `set()`, `get()` functions\n\n### Comparison with Other Libraries\n\n| Feature | Zustic | Redux | Zustand | Context API |\n|---------|--------|-------|---------|-------------|\n| Bundle Size | ~500B | ~6KB | ~2KB | 0B |\n| Learning Curve | ⭐ Easy | ⭐⭐⭐⭐⭐ Hard | ⭐⭐ Easy | ⭐⭐⭐ Medium |\n| Boilerplate | Minimal | Massive | Minimal | Some |\n| TypeScript | Excellent | Good | Good | Good |\n| Store Middleware | Built-in | Required | Optional |  No |\n| Query System | Built-in |  Separate |  Separate |  No |\n| Caching | Automatic | Optional | Optional |  No |\n| API Simplicity | Very Simple | Complex | Simple | Medium |\n\n---\n\n##  Quick Start\n\n### 1. Create Your Store\n\n```typescript\nimport { create } from 'zustic';\n\ntype CounterStore = {\n  count: number;\n  inc: () =\u003e void;\n  dec: () =\u003e void;\n  reset: () =\u003e void;\n};\n\nexport const useCounter = create\u003cCounterStore\u003e((set) =\u003e ({\n  count: 0,\n  inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  dec: () =\u003e set((state) =\u003e ({ count: state.count - 1 })),\n  reset: () =\u003e set({ count: 0 }),\n}));\n```\n\n### 2. Use in Your Component\n\n```typescript\nimport { useCounter } from './store';\n\nfunction Counter() {\n  const { count, inc, dec, reset } = useCounter();\n\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003eCount: {count}\u003c/p\u003e\n      \u003cbutton onClick={inc}\u003e➕ Increment\u003c/button\u003e\n      \u003cbutton onClick={dec}\u003e➖ Decrement\u003c/button\u003e\n      \u003cbutton onClick={reset}\u003eReset\u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default Counter;\n```\n\nThat's it! No providers, no boilerplate, just pure state management.\n\n---\n\n## Core Concepts\n\n### Create a Store\n\nThe `create` function is the heart of Zustic:\n\n```typescript\nconst useStore = create\u003cStoreType\u003e((set, get) =\u003e ({\n  // Your state and actions\n}));\n```\n\n- **`set`**: Update state (supports partial updates and functions)\n- **`get`**: Read current state (works outside components)\n\n### Reading State in Components\n\n```typescript\nfunction Component() {\n  // Subscribe to entire store\n  const state = useStore();\n  \n  // Or subscribe to specific properties (optimized)\n  const count = useStore((state) =\u003e state.count);\n  \n  return \u003cdiv\u003e{count}\u003c/div\u003e;\n}\n```\n\n## Store Middleware System\n\nExtend Zustic stores with powerful middleware for logging, persistence, validation, and more.\n\n### Logger Middleware\n\n```typescript\nconst logger = \u003cT extends object\u003e(): Middleware\u003cT\u003e =\u003e (set, get) =\u003e (next) =\u003e async (partial) =\u003e {\n  console.log('Previous State:', get());\n  await next(partial);\n  console.log('New State:', get());\n};\n\nexport const useStore = create\u003cStoreType\u003e(\n  (set) =\u003e ({\n    count: 0,\n    inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  }),\n  [logger()]\n);\n```\n\n### Persistence Middleware\n\n```typescript\nconst persist = \u003cT extends object\u003e(): Middleware\u003cT\u003e =\u003e (set, get) =\u003e (next) =\u003e async (partial) =\u003e {\n  await next(partial);\n  localStorage.setItem('store', JSON.stringify(get()));\n};\n\nexport const useStore = create\u003cStoreType\u003e(\n  (set) =\u003e ({\n    count: 0,\n    inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  }),\n  [persist()]\n);\n```\n\n### Validation Middleware\n\n```typescript\nconst validate = \u003cT extends object\u003e(): Middleware\u003cT\u003e =\u003e (set, get) =\u003e (next) =\u003e async (partial) =\u003e {\n  // Validate before updating\n  if (typeof partial === 'object' \u0026\u0026 partial.count \u003c 0) {\n    console.warn('Invalid state update');\n    return;\n  }\n  await next(partial);\n};\n\nexport const useStore = create\u003cStoreType\u003e(\n  (set) =\u003e ({\n    count: 0,\n    inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  }),\n  [validate()]\n);\n```\n\n### Multiple Middleware\n\n```typescript\nexport const useStore = create\u003cStoreType\u003e(\n  (set) =\u003e ({\n    count: 0,\n    inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  }),\n  [logger(), persist(), validate()]\n);\n```\n\n---\n\n## Query System (API Data Fetching)\n\nZustic now includes a powerful query system for managing API requests with automatic caching, mutations, middleware, and plugins.\n\n### Create an API\n\n```typescript\nimport { createApi } from 'zustic/query';\n\ntype User = {\n  id: number;\n  name: string;\n  email: string;\n};\n\nconst baseQuery = async (args: any) =\u003e {\n  try {\n\n    const response = await fetch(`https://api.example.com${args.url}`, {\n      method: args.method || 'GET',\n      headers: args.headers,\n      body: args.body ? JSON.stringify(args.body) : undefined,\n    });\n    const data = await response.json();\n    return { data };\n  } catch (error) {\n    return { error };\n  }\n};\n\nexport const api = createApi({\n  baseQuery,\n  endpoints: (builder) =\u003e ({\n    getUsers: builder.query\u003cUser[], void\u003e({\n      query: () =\u003e ({\n        url: '/users',\n        method: 'GET',\n      }),\n      transformResponse: (data) =\u003e data.map((u: User) =\u003e ({ ...u, name: u.name.toUpperCase() })),\n    }),\n    \n    getUser: builder.query\u003cUser, { id: number }\u003e({\n      query: ({ id }) =\u003e ({\n        url: `/users/${id}`,\n        method: 'GET',\n      }),\n    }),\n    \n    createUser: builder.mutation\u003cUser, Omit\u003cUser, 'id'\u003e\u003e({\n      query: (body) =\u003e ({\n        url: '/users',\n        method: 'POST',\n        body,\n      }),\n      onSuccess: (data) =\u003e console.log('User created:', data),\n      onError: (error) =\u003e console.error('Failed to create:', error),\n    }),\n    \n    updateUser: builder.mutation\u003cUser, Partial\u003cUser\u003e\u003e({\n      query: (body) =\u003e ({\n        url: `/users/${body.id}`,\n        method: 'PUT',\n        body,\n      }),\n    }),\n  }),\n  cacheTimeout: 5 * 60 * 1000, // 5 minutes\n});\n```\n\n### Use Queries in Components\n\n```typescript\nimport { api } from './api';\n\nfunction UsersList() {\n  // Query hook automatically fetches on mount\n  const { data: users, isLoading, isError, error, reFetch } = api.useUsersQuery();\n\n  if (isLoading) return \u003cdiv\u003eLoading...\u003c/div\u003e;\n  if (isError) return \u003cdiv\u003eError: {error?.message}\u003c/div\u003e;\n\n  return (\n    \u003cdiv\u003e\n      \u003ch2\u003eUsers\u003c/h2\u003e\n      \u003cbutton onClick={() =\u003e reFetch()}\u003eRefresh\u003c/button\u003e\n      \u003cul\u003e\n        {users?.map((user) =\u003e (\n          \u003cli key={user.id}\u003e{user.name}\u003c/li\u003e\n        ))}\n      \u003c/ul\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n### Skip Queries (Conditional Fetching)\n\n```typescript\nfunction UserDetail({ userId }: { userId?: number }) {\n  // Only fetch when userId is provided\n  const { data: user, isLoading } = api.useGetUserQuery(\n    { id: userId! },\n    { skip: !userId }\n  );\n\n  if (!userId) return \u003cdiv\u003eSelect a user\u003c/div\u003e;\n  if (isLoading) return \u003cdiv\u003eLoading...\u003c/div\u003e;\n\n  return \u003cdiv\u003e{user?.name} ({user?.email})\u003c/div\u003e;\n}\n```\n\n### Use Mutations in Components\n\n```typescript\nfunction CreateUserForm() {\n  // Mutation hook returns [mutate, state]\n  const [createUser, { isLoading, isError, error, data, isSuccess }] = api.useCreateUserMutation();\n\n  const handleSubmit = async (e: React.FormEvent\u003cHTMLFormElement\u003e) =\u003e {\n    e.preventDefault();\n    const formData = new FormData(e.currentTarget);\n    \n    await createUser({\n      name: formData.get('name') as string,\n      email: formData.get('email') as string,\n    });\n  };\n\n  return (\n    \u003cform onSubmit={handleSubmit}\u003e\n      \u003cinput name=\"name\" placeholder=\"Name\" required /\u003e\n      \u003cinput name=\"email\" type=\"email\" placeholder=\"Email\" required /\u003e\n      \u003cbutton type=\"submit\" disabled={isLoading}\u003e\n        {isLoading ? 'Creating...' : 'Create User'}\n      \u003c/button\u003e\n      {isSuccess \u0026\u0026 \u003cp User created!\u003c/p\u003e}\n      {isError \u0026\u0026 \u003cp\u003e Error: {error?.message}\u003c/p\u003e}\n    \u003c/form\u003e\n  );\n}\n```\n\n### Query API Features\n\n#### Transformations\n\n```typescript\ngetUser: builder.query\u003cUser, { id: number }\u003e({\n  query: ({ id }) =\u003e ({\n    url: `/users/${id}`,\n    method: 'GET',\n  }),\n  // Transform the response data\n  transformResponse: (data) =\u003e ({\n    ...data,\n    formattedDate: new Date(data.createdAt).toLocaleDateString(),\n  }),\n  // Transform errors\n  transformError: (error) =\u003e ({\n    message: error.message || 'Unknown error occurred',\n    code: error.code,\n  }),\n  // Transform request body\n  transformBody: (body) =\u003e ({\n    ...body,\n    timestamp: Date.now(),\n  }),\n  // Transform request headers\n  transformHeader: (headers) =\u003e ({\n    ...headers,\n    'Authorization': `Bearer ${getToken()}`,\n  }),\n}),\n```\n\n#### Hooks and Callbacks\n\n```typescript\ncreateUser: builder.mutation\u003cUser, CreateUserInput\u003e({\n  query: (body) =\u003e ({\n    url: '/users',\n    method: 'POST',\n    body,\n  }),\n  onSuccess: async (data) =\u003e {\n    console.log( 'User created:', data)\n  },\n  onError: async (error) =\u003e {\n    console.error(' Failed:', error)\n  },\n}),\n```\n\n#### Automatic Caching\n\n```typescript\nconst api = createApi({\n  baseQuery,\n  endpoints: (builder) =\u003e ({\n    getUser: builder.query\u003cUser, { id: number }\u003e({\n      query: ({ id }) =\u003e ({\n        url: `/users/${id}`,\n        method: 'GET',\n      }),\n    }),\n  }),\n  cacheTimeout: 10 * 60 * 1000, // Cache for 10 minutes\n});\n\n// First call: fetches from API\nconst result1 = useGetUserQuery({ id: 1 });\n\n// Second call (within cache timeout): uses cached data\nconst result2 = useGetUserQuery({ id: 1 });\n\n// Force refetch\nconst result3 = await reFetch();\n```\n\n#### Custom Query Function\n\n```typescript\ngetUserCustom: builder.query\u003cUser, { id: number }\u003e({\n  queryFnc: async (arg, baseQuery) =\u003e {\n    // Implement custom logic\n    const token = localStorage.getItem('token');\n    return baseQuery({\n      url: `/users/${arg.id}`,\n      method: 'GET',\n      headers: { Authorization: `Bearer ${token}` },\n    });\n  },\n}),\n```\n\n---\n\n## Query Middleware \u0026 Plugins\n\n### Query-Level Middleware\n\n```typescript\nconst requestLogger: ApiMiddleware = (ctx, next) =\u003e {\n  console.log('Request:', ctx.arg);\n  const result = await next();\n  console.log('Response:', result);\n  return result;\n};\n\ngetUser: builder.query\u003cUser, { id: number }\u003e({\n  query: ({ id }) =\u003e ({\n    url: `/users/${id}`,\n    method: 'GET',\n  }),\n  middlewares: [requestLogger],\n}),\n```\n\n### Global Plugins\n\n```typescript\nconst authPlugin: ApiPlugin = {\n  name: 'auth-plugin',\n  \n  beforeQuery: (ctx) =\u003e {\n    const token = localStorage.getItem('token');\n    if (!token) {\n      throw new Error('Not authenticated');\n    }\n  },\n  \n  afterQuery: (result, ctx) =\u003e {\n    if (result.error?.status === 401) {\n      // Handle unauthorized\n      window.location.href = '/login';\n    }\n  },\n  \n  onError: (error, ctx) =\u003e {\n    console.error('API Error:', error);\n  },\n};\n\nconst api = createApi({\n  baseQuery,\n  endpoints: (builder) =\u003e ({\n    // endpoints...\n  }),\n  plugins: [authPlugin],\n});\n```\n\n---\n\n## Multi-Platform Examples\n\n### React Web\n\n```typescript\nimport { create } from 'zustic';\n\nconst useStore = create((set) =\u003e ({\n  count: 0,\n  inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n}));\n\nexport default function App() {\n  const { count, inc } = useStore();\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003e{count}\u003c/p\u003e\n      \u003cbutton onClick={inc}\u003eIncrement\u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n### React Native\n\n```typescript\nimport { create } from 'zustic';\nimport { View, Text, Button } from 'react-native';\n\nconst useStore = create((set) =\u003e ({\n  count: 0,\n  inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n}));\n\nexport default function App() {\n  const { count, inc } = useStore();\n  return (\n    \u003cView\u003e\n      \u003cText\u003e{count}\u003c/Text\u003e\n      \u003cButton title=\"Increment\" onPress={inc} /\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n### Next.js\n\n```typescript\n'use client';\n\nimport { create } from 'zustic';\n\nconst useStore = create((set) =\u003e ({\n  count: 0,\n  inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n}));\n\nexport default function Page() {\n  const { count, inc } = useStore();\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003e{count}\u003c/p\u003e\n      \u003cbutton onClick={inc}\u003eIncrement\u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n---\n\n## Testing\n\nZustic stores are easy to test:\n\n```typescript\nimport { create } from 'zustic';\n\n// Your store\nconst useStore = create((set) =\u003e ({\n  count: 0,\n  inc: () =\u003e set((state) =\u003e ({ count: state.count + 1 })),\n  reset: () =\u003e set({ count: 0 }),\n}));\n\n// Test it\ndescribe('Counter Store', () =\u003e {\n  it('should increment count', () =\u003e {\n    useStore.set({ count: 0 });\n    useStore.get().inc();\n    expect(useStore.get().count).toBe(1);\n  });\n\n  it('should reset count', () =\u003e {\n    useStore.set({ count: 5 });\n    useStore.get().reset();\n    expect(useStore.get().count).toBe(0);\n  });\n});\n```\n\n---\n\n## Advanced Examples\n\n### Async State\n\n```typescript\nconst useUserStore = create((set, get) =\u003e ({\n  user: null,\n  loading: false,\n  error: null,\n  \n  fetchUser: async (id: string) =\u003e {\n    set({ loading: true });\n    try {\n      const response = await fetch(`/api/users/${id}`);\n      const user = await response.json();\n      set({ user, loading: false, error: null });\n    } catch (error) {\n      set({ error: error.message, loading: false });\n    }\n  },\n}));\n```\n\n### Computed State\n\n```typescript\nconst useCartStore = create((set, get) =\u003e ({\n  items: [],\n  \n  addItem: (item) =\u003e set((state) =\u003e ({\n    items: [...state.items, item],\n  })),\n  \n  get total() {\n    return get().items.reduce((sum, item) =\u003e sum + item.price, 0);\n  },\n}));\n```\n\n### Nested Stores\n\n```typescript\nconst useAuthStore = create((set) =\u003e ({\n  user: null,\n  login: (user) =\u003e set({ user }),\n  logout: () =\u003e set({ user: null }),\n}));\n\nconst useAppStore = create((set) =\u003e ({\n  auth: useAuthStore,\n  theme: 'light',\n}));\n```\n\n---\n\n## Resources\n\n- 📖 **[Full Documentation](https://zustic.github.io/)** - Complete API reference and guides\n- 🐛 **[GitHub Issues](https://github.com/DeveloperRejaul/zustic/issues)** - Report bugs and request features\n- 💬 **[Discussions](https://github.com/DeveloperRejaul/zustic/discussions)** - Ask questions and share ideas\n- 📦 **[NPM Package](https://npm.im/zustic)** - Install and view package info\n\n---\n\n## API Reference\n\n### `create\u003cT\u003e(initializer, middlewares?)`\n\nCreates a new store with state and actions.\n\n**Parameters:**\n- `initializer` - Function that receives `set` and `get`, returns initial state\n- `middlewares` (optional) - Array of middleware functions\n\n**Returns:**\n- A hook function that provides access to store state and actions\n\n**Example:**\n```typescript\nconst useStore = create((set, get) =\u003e ({\n  value: 0,\n  increment: () =\u003e set((state) =\u003e ({ value: state.value + 1 })),\n  getValue: () =\u003e get().value,\n}));\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request to the [GitHub repository](https://github.com/DeveloperRejaul/zustic).\n\n---\n\n## License\n\nMIT License © 2024 [Rejaul Karim](https://github.com/DeveloperRejaul)\n\n---\n\n## Author\n\nCreated by **Rejaul Karim** - [GitHub](https://github.com/DeveloperRejaul)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### Made with ❤️ for the React community\n\n⭐ Star us on [GitHub](https://github.com/DeveloperRejaul/zustic) if you find this helpful!\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperrejaul%2Fzustic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloperrejaul%2Fzustic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperrejaul%2Fzustic/lists"}