Back to Hyperapp

Flowchart

docs/architecture/flowchart.md

2.0.221.4 KB
Original Source
mermaid
graph TD
    init("     init     ")
    init --- |"init:{state}
init:[state, effect(s)]
"|j0[ ] --- j1[ ] -->nextState
    init --> |"init:Action
init:[Action, payload?]"|Action

    domevent("DOM/synthetic 
events
 (click/myevent) ") --> viewEvent
    viewEvent(("    view    
event")) --> Action
    externalEvents("global/external
processes
 (window resize) ") --> subscription
    subscription(("subscription")) -->Action

    Action[" Action 
(state change)"] -->|"OtherAction
 [OtherAction, payload?]
"|Action
    Action --- |"NextState
[NextState, ...Effects]"|j2[ ] ---> nextState
    
    nextState(("  next  
state")) --- j3[ ]
    j3 --> |"view(state)"|newDom("   (re)render  
    DOM   ")
    j3 --> |"subscriptions(state)"|recalcSubs(recalc
subscriptions)
    j3 --> |"(dispatch, Payload?) -> void"|effect
    effect("Effects
(impure code)") -.-> |"dispatch"|dispatchAction("Action")
    
    style j0 height:1px;
    style j0 width:1px;
    style j1 height:1px;
    style j1 width:1px;
    style j2 height:1px;
    style j2 width:1px;
    style j3 height:1px;
    style j3 width:1px;