Skip to content

Commit

Permalink
add checkpoints with live examples (#890)
Browse files Browse the repository at this point in the history
Also some minor tweaks
  • Loading branch information
zaceno authored and jorgebucaran committed Oct 16, 2019
1 parent a97d414 commit a864215
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ as an argument, so it can be reduced to:
]),
```

Visually, everything is _still_ the same.
Visually, everything is _still_ the same. If you'd like to see a working example of the code so far, have a look [here](https://codesandbox.io/s/hyperapp-tutorial-step-1-gq662)

Actions
---------------------
Expand Down Expand Up @@ -439,7 +439,7 @@ const StartEditingFilter = state => ({...state, editingFilter: true})
```

Actions are just functions describing transformations of the state.
This actioin keep everything in the state the same except for `editingFilter`
This action keeps everything in the state the same except for `editingFilter`
which it sets to `true`.

When Hyperapp dispatches an action, it replaces the old state with the new
Expand Down Expand Up @@ -623,6 +623,8 @@ payload through it, providing the returned value as payload to the action.

> Payload filters are also useful when you need a payload that is a combination of custom data and event data
If you'd like to see a working example of the code so far, have a look [here](https://codesandbox.io/s/hyperapp-tutorial-step-2-5yv34)

Effects
----------------------------

Expand Down Expand Up @@ -838,6 +840,7 @@ When the app loads, and when you change the filter, you should see the spinner a
> If you aren't seeing the spinner, it might just be happening too fast. Try choking your network speed. In the Chrome
> browser you can set your network speed to "slow 3g" under the network tab in the developer tools.
If you'd like to see a working example of the code so far, have a look [here](https://codesandbox.io/s/hyperapp-tutorial-step-3-2mmug)

Subscriptions
-------------------------------------------------------------------
Expand Down Expand Up @@ -897,6 +900,8 @@ will start when we check the auto update box, and stop when it is unchecked.
> may need to implement your own. Refer to the [API reference](). Again,
> it is no big deal - just not in scope for this tutorial.
If you'd like to see a working example of the final code, have a look [here](https://codesandbox.io/s/hyperapp-tutorial-step-4-8u9q8)

Conclusion
------------------

Expand All @@ -906,5 +911,5 @@ Along the way you've familiarized yourself with
the core concepts: _view_, _state_, _actions_, _effects_ & _subscriptions_. And that's really all you need to
build any web application.

So now, go build your dream app, or browse our [Examples]() for more
So now, go build your dream app, or browse our [Examples](./examples.md) for more
inspiration.

0 comments on commit a864215

Please sign in to comment.