hackhaton-space-stackHackhaton Space Stack
AcademyBuilder
Get Started
All terms
The Basics
  • Stack
  • Frontend & Backend
  • CLI
  • Monorepo
  • Server
  • Localhost
How AI Works
  • Context Window
  • Hallucination
  • Token
  • Prompt Caching
  • Session
  • Compaction
  • Embedding
  • Vector Database
  • RAG
  • Fine-tuning
  • Temperature
  • Inference
  • Reasoning
  • Multimodal
Building With AI
  • Agent
  • MCP
  • System Prompt
  • Skill
  • CLAUDE.md
  • Slash Command
  • Harness
  • Computer Use
  • Agents SDK
  • Voice Agents
  • OAuth
  • Vibe Coding
  • Permission Scope
  • Tool Calling
  • Prompt Injection
  • Eval
  • Guardrails
  • Sandbox
  • Progressive Disclosure
Code & Collaboration
  • Git
  • Commit
  • Branch
  • GitHub
  • Pull Request
  • Open Source
  • Markdown
  • Dependency
  • Merge
  • Fork
APIs & Connections
  • API
  • Auth
  • Database
  • ORM
  • SDK
  • Webhook
  • Endpoint
  • REST
  • HTTP Methods
  • Env File
  • Schema
  • JSON
  • YAML
  • Secret
  • Rate Limit
  • CORS
  • Cookie
  • Encryption
Shipping & Running
  • Deploy
  • Headless
  • Cron
  • DNS
  • CDN
  • Object Storage
  • Serverless
  • Edge
  • Worker
  • Runtime
  • Process
  • Daemon
  • Queue
  • Job
  • State
  • Cache
  • SSH
  • Build
  • Staging
  • Rollback
  • Docker
  • Feature Flag
  • Test
  • CI/CD
  • The Cloud
Debugging & Errors
  • Trace
  • Type Error
  • Stack Trace
  • Log
  • Bug
  • Patch
  • Latency
How Developers Think
  • DRY
  • YAGNI
  • KISS
  • Refactoring
  • Technical Debt
  • Async
← All terms

Type-safe, modern TypeScript scaffolding for full-stack web development

ThreadsGitHub

Info

  • Academy
  • Docs

Legal

  • Terms of Service
  • Privacy Policy

© 2026 Dzulhelmy Nazri

Shipping & Running

$definestate--plain-english

State

TLDRThe stuff the app has to remember while it's running — and after.

State is the sticky notes on the monitor. Storage is the notebook you take home.

Your app is thinking right now. Which modal is open. What the judge typed into the form. Which step the agent already finished. That working picture is state. It is not the database. The database is what you still know tomorrow. State is what you know this second, in this process, in this session.

Kill the process and the notes hit the floor. That's why serverless feels rude: every request may be a new process. If you stuffed the shopping cart in a variable, the cart is empty on the next click. The judge thinks your app is broken. You hid the memory in the wrong pocket.

Two pockets

  • UI state — which tab is selected, is the modal open — can live in the process, the URL, or a cookie. Lose it and the screen looks weird, not empty.
  • Business state — whose todos, what they paid, the Polar receipt — lives in a database. Lose that and you have a pretty room with amnesia.

Cache is a rumor of state. Allowed to be wrong for a minute. Don't put the receipt there.

Agents forget the same way

An agent doing a multi-step job needs a working picture. "Step one is done, here's the file, now step two." If the process dies and you never wrote that down, the agent wakes up as a stranger. That's a state problem, not a model problem.

The builder already picked a cabinet for you. Auth sessions, todos, the user row survive a refresh because they were never only in RAM. When you invent a new thing the app must remember, pick a pocket on purpose.

What this unlocks

Until you know where "right now" lives, every crash is a mystery. After you do, the cart belongs in the database, the modal belongs in the URL, the agent's checklist belongs in a file. The demo survives a refresh. The agent can continue. You stop blaming the model for a wiped board.

Related

  • Process
  • Database
  • Cache
PrevJob

Shipping & Running

NextCache