diff --git a/README.md b/README.md index 062e549..fb3507d 100644 --- a/README.md +++ b/README.md @@ -1,168 +1,113 @@ -# Lit + Zustand Architecture +# Lit-Only Architecture (No Build) -A simple (but modern & scalable) no-build web application architecture using Lit web components with Zustand state management and IndexedDB persistence. +A minimal, no-build web application using only Lit web components with local state management. + +> **Note:** This is the `lit-only` branch. For the full-featured version with Zustand state management and IndexedDB persistence, see the `main` branch. ## For TSX/React Developers -If you're coming from React/TSX, here's how this architecture maps to familiar concepts: +If you're coming from React/TSX, here's how this minimal architecture maps to familiar concepts: | React/TSX Pattern | This Architecture | |-------------------|-------------------| -| `useState` / `useReducer` | Zustand vanilla store | -| `useEffect` + state subscription | `StoreController` (ReactiveController) | -| Context API | Global Zustand store | -| `localStorage` / `sessionStorage` | IndexedDB via persist middleware | +| `useState` | Lit's `static properties` with `state: true` | +| Props drilling | Property passing via `.prop=${value}` | +| Custom events | `CustomEvent` with `bubbles: true` | | JSX | Lit's `html` tagged template literals | | CSS-in-JS / CSS Modules | Lit's `css` tagged template literals | -| React Router | Simple route state in store | +| React Router | Simple route state in root component | | Build step (Vite/Webpack) | Import maps (no build!) | ### Key Differences 1. **No Virtual DOM**: Lit uses native Web Components with efficient DOM updates 2. **No Build Step**: Import maps let you use npm packages directly from CDN -3. **Reactive Controllers**: Replace hooks - attach to component lifecycle -4. **Tagged Templates**: Instead of JSX, use `html\`