A TypeScript monorepo providing reusable utilities, React components, web helpers, and shared configuration packages.
| Package | Description | Docs |
|---|---|---|
@wo-library/js |
Pure JS/TS utilities (arrays, numbers, objects, colors, SVG) | README |
@wo-library/react |
React components (atomic design) and hooks | README |
@wo-library/web |
Browser/DOM utilities (fetch, storage, script loading) | README |
@wo-library/ui |
CSS styles, themes, and SVG path data | README |
@wo-library/eslint-config |
Shared ESLint flat-config presets | README |
@wo-library/postcss-config |
Shared PostCSS configuration | README |
@wo-library/stylelint-config |
Shared Stylelint configuration | README |
@wo-library/semantic-release-config |
Semantic release presets | README |
# Install dependencies
pnpm install
# Build all packages
pnpm nx run-many --target=build
# Run tests
pnpm nx run-many --target=test// Named exports only — no default imports
import { formatNumber, range } from "@wo-library/js";
import { useCalendly, useMethods } from "@wo-library/react";
import { loadScript, WoFetch } from "@wo-library/web";- Named exports only — default exports are not used in public APIs.
- TypeScript strict mode — no
anytypes; useunknowninstead. - Indian number locale —
formatNumberusesen-IN(Lakhs/Crores). - CSS Modules — component styles use
*.module.css, never inline styles. lodash-es— always use the tree-shakeable ESM build, neverlodash.
-
When using
useMethodsfrom thereact-uselibrary, memoize the state argument before passing it to the function by wrapping in auseMemo, or the provider would return new state and methods every time, causing extra re-renders. -
Wrap the returned methods object in another
useMemoso that it isn't treated as a new variable even when the state changes. -
Create two providers: one with the state values and the other with the dispatcher/methods values. Since the methods are fixed, components consuming only the methods will not re-render when the provider state changes.
See .ai/instructions.md for coding standards and patterns.
MIT