Skip to content

Commit

Permalink
Tweak flow live docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Oct 30, 2023
1 parent a9d8e93 commit 054ccc6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/Flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We're about to add a new capability to step 3. Let's begin:

A `flow` calculates a derived value "automatically". Here's a basic flow, which calculates the area of a room:

<div class="cm-doc" data-cm-doc-result-format="pass-fail">
<div class="cm-doc" data-cm-doc-no-result>
{:id :room-area
:inputs {:w [:room :width]
:h [:room :length]}
Expand Down Expand Up @@ -507,6 +507,8 @@ Let's update the app to display our new error state:
[app-container [tabbed-app-with-error]])
</div>

!!! Note "Click `eval` on the code block above to start this app."

<div id="item-counter-error"></div>

Your app is working fine, until the next redesign.
Expand All @@ -532,7 +534,7 @@ We build a basic form with the power to change the requirement:

And a corresponding event, which triggers our `:reg-flow` effect.

<div class="cm-doc" data-cm-doc-result-format="pass-fail">
<div class="cm-doc" data-cm-doc-result-format="pass-fail" data-cm-doc-no-eval-on-init>
(rf/reg-event-fx
:change-requirements
(fn [_ [_ new-requirements]]
Expand Down Expand Up @@ -568,6 +570,8 @@ Let's test it out:
[app-container [tabbed-app-with-error]])
</div>

!!! Note "Click `eval` on the two code blocks above to start this app."

<div id="item-counter-requirements"></div>

## Semantics and Placefulness
Expand Down

0 comments on commit 054ccc6

Please sign in to comment.