Skip to content

manuscriptmastr/cookbook

Repository files navigation

Cookbook

Just a bunch of recipes, with tests! Use npm run test to run the test suite.

Recipes

Undo/redo

  • Archivable

Decorators

  • @persist(storageKey, storage?)
  • @tap(fn)

Error handling

  • raise
  • rescue

Functional

  • applyN
  • chainRec
  • previous
  • onceEvery
  • onceUnless
  • thru

AST

  • query
  • o
  • m
  • c

Signals

  • signal(initialValue)
  • computed(fn)
  • effect(fn)

SwiftUI

  • Color
  • Text
  • VStack
  • List

Async patterns

  • Task
  • TaskTree