← all projects
NPM Package

Meemaw

React utility component library with 9 components. Declarative conditional rendering, iteration, time-based display. 100% test coverage, ~7KB bundle.

Zero-dependency React library eliminating repetitive JSX patterns. Features Show, Switch/Case, Repeat, Hidden, Clamp, CopyToClipboard components.

React
TypeScript
Jest
Tree-shakeable

Problem Statement

React JSX is littered with the same noisy patterns: ternaries for conditional rendering (isLoggedIn ? <A/> : <B/>), nested ternaries for multi-branch logic, .map() boilerplate for iteration, ad-hoc breakpoint checks for responsive hiding, and one-off clipboard handlers. Individually trivial, collectively they make components harder to read and review. Every project re-implements them.

Proposed Solution

Meemaw is a tiny, zero-dependency React utility library of declarative components that replace those patterns with readable, intention-revealing markup — <Show>, <Switch>/<Case>/<Default>, <Hidden>, <Repeat>, <Clamp>, <CopyToClipboard> and more — so the JSX reads like what it does.

Full Solution Details

  • <Show when={...} fallback={...}> — conditional rendering with an optional fallback and a when/if alias; replaces the ubiquitous ternary.
  • <Switch>/<Case when={...}>/<Default> — a clean match-case for multi-branch UI (order status, role, etc.) instead of nested ternaries.
  • <Hidden when={...}> / <Hidden on="mobile"> — conditional and responsive hiding by breakpoint (['mobile','tablet']), no manual media-query hooks.
  • <Repeat> — declarative iteration without .map() ceremony.
  • <Clamp> — time/length-based display constraints.
  • <CopyToClipboard> — drop-in clipboard behavior.
  • 9 components total, each importable individually.

Technical Documentation

Pure React + TypeScript with React as the only peer dependency (zero runtime deps), shipped tree-shakeable so you only pay for what you import, total bundle under 10KB. TypeScript-first with full types out of the box, 100% test coverage (Jest), and SSR-compatible (works under Next.js, Remix, etc.). Published to npm. The design philosophy is intentionally minimal — each component is a thin, well-typed wrapper whose value is readability and consistency, not features.

Tech Stack

React (peer), TypeScript, Jest (100% coverage), tree-shakeable ESM build, npm distribution.

System Design

meemaw (≤10KB, zero-dep, peer: react)
 ├── Show / Hidden        conditional + responsive rendering
 ├── Switch / Case / Default   match-case branching
 ├── Repeat               declarative iteration
 ├── Clamp                bounded display
 └── CopyToClipboard      clipboard action
      each export tree-shakeable · SSR-safe · 100% test coverage

Smart Architectural Decisions

  • Readability as the product. The library doesn't add capability you couldn't write yourself — it makes intent obvious (<Show when> vs a ternary). Choosing clarity as the value proposition is a mature, opinionated API decision.
  • Zero deps + ≤10KB + tree-shakeable means it's safe to adopt in any project without bundle guilt.
  • SSR-compatible + 100% test coverage signal it's built to be depended on, not just published.
  • Dual when/if aliasing and breakpoint-aware <Hidden on=> show attention to ergonomics and real-world usage.
  • Dogfooded across the author's own apps (Watchdog, WordShot, BuffByte all import it), proving it in production.

Impacts

A published, tree-shakeable npm library that cleans up conditional/iterative JSX with 100% test coverage and a <10KB footprint — and is reused as a foundation across the author's own production apps.

Demonstrated Skills

React component/library design; API ergonomics and opinionated minimalism; TypeScript typing of polymorphic components; 100% test coverage discipline (Jest); SSR-safe authoring; tree-shakeable zero-dependency packaging and npm publishing; dogfooding OSS in real products.

Notes

  • Taste over features: choosing readability as the entire value prop, and executing it with a clean, minimal API, signals strong design judgment — the kind that improves a whole team's codebase.
  • Quality bar: 100% test coverage + SSR support + <10KB + zero deps is production-library hygiene most side projects skip.
  • Dogfooding proof: it's imported across his other apps (Watchdog, WordShot, BuffByte), so it's battle-tested, not shelf-ware.
  • Great talking point in interviews about API design trade-offs (when vs if, components vs hooks, when not to abstract).
Ask me anything