Text
Text
History visualization with the microcosm debugger tool
actions
repo.state.planets now exists
A Microcosm instance. The source of truth.
State manipulators
Action side effects
Actions are represented as plain functions or strings.
A stateful operation to be added to history
Actions have State!
Unlock a deeper level of control by returning a function
Cancel an action:
Time Travel with
repo.checkout(action)
Top-level Components that respond to state change and intents
Objective: Keep your app logic at the top, and child components as dumb as possible
What it's for:
Push an action that fetches data from the setup or update method
Fetch data for a route
Use model() to create props from state to be passed to the view
Pulling data out of state
Use register() to catch and handle intents bubbling up from child views
What it's for: Responding to Intents with app logic
Bubbling string messages with optional payloads
Using withIntent adds a send prop
In this case:
A Presenter registered with the intent will catch it and run your app logic.
CLICK!
the <Form /> addon
@nhunzaker (creator of Microcosm.js)
@dantello5 (me)
@viget (provider of current pizza, beer, and shelter)