Skip to content

Commit 8a82538

Browse files
Add expansion ideas to example docs
Co-authored-by: me <me@kentcdodds.com>
1 parent b727a93 commit 8a82538

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

examples/muffin-shop-checkout/readme.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ booleans, variables, functions, if/else, switch statements, and loops.
2727
```sh nonumber
2828
npm run start --workspace examples/muffin-shop-checkout
2929
```
30+
31+
## Try next
32+
33+
- 🐨 Add a `dailySpecialCount` and `dailySpecialPrice`, then include them in the
34+
`subtotal`.
35+
- 🐨 Create a `hasCoupon` boolean and apply an extra discount with an `if` check.
36+
- 🐨 Use a loop to build a `summaryLine` like `Items: 5 total`.
37+
- 🐨 Add a `rushOrder` flag that increases the `tipPercent` when true.
38+
- 💰 Try a new `pickupMethod` value and update the switch to handle it.

examples/muffin-shop-dashboard/readme.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ see different outputs.
2929
```sh nonumber
3030
npm run dev --workspace examples/muffin-shop-dashboard
3131
```
32+
33+
## Try next
34+
35+
- 🐨 Add another `OrderItem` and watch the totals change.
36+
- 🐨 Add a `rushOrder` boolean and increase the tip when it is true.
37+
- 🐨 Add a `itemCount` helper that uses a loop to count total quantity.
38+
- 🐨 Add a `happyHour` boolean and reduce the muffin price when true.
39+
- 🐨 Add a `memberMessage` string in `app.tsx` using an `if` check.
40+
- 💰 Change `specialNote` to a real note and confirm the fallback logic.

0 commit comments

Comments
 (0)