Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

writing-kea-logics

Write or review a PostHog kea logic file, choosing the right builders and wiring React components.

When to use it

You're adding a new *Logic.ts file or a reducer, selector, loader, or listener to an existing one and aren't sure which container fits.

For example

You say

Use writing-kea-logics to create a fooLogic.ts that loads a Foo by fooId from the API, exposes an uppercased name selector, and wires a FooPanel component with useValues.

You get
  • fooLogic.ts with loaders and selectors
  • Inline typegen blocks
  • FooPanel wired with useValues

How it works

  • A decision flow picks loader, selector, reducer, or cache before any builder is written.
  • Listeners are preferred over kea-subscriptions for reacting to value changes.
  • Typegen can be scoped to a single logic file while iterating.