Skip to content

Commit

Permalink
chore(readme): add secret to example
Browse files Browse the repository at this point in the history
  • Loading branch information
UberMouse authored Sep 19, 2022
1 parent abae28d commit 4285993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -79,6 +79,7 @@ const view = buildView(machine, actions, selectors, slots, ({ actions, selectors
<button onClick={() => actions.switch()}>{inState("active") ? "Deactivate" : "Activate"}</button>
<p>Count: {selectors.count}</p>
<button onClick={() => actions.increment(1)} disabled={!selectors.canIncrement}>Increment</button>
{selectors.showSecret && <p>The secret password is hunter2</p>}
</div>
);
});
@@ -186,4 +187,4 @@ are planning on rendering the view using the xstate-tree machine itself, or test
via the view.

It's a simple function that takes a name argument and returns a basic xstate-tree machine that you
can replace slot services with. It just renders a div containing the name supplied
can replace slot services with. It just renders a div containing the name supplied

0 comments on commit 4285993

Please sign in to comment.