Skip to content

Commit

Permalink
Fix tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
allevo committed May 15, 2024
1 parent 52abed1 commit 5e01462
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/website/src/pages/GettingStarted_3refreshQuote.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export async function Main(this: SeqflowFunctionContext) {
// This async arrow function fetches a new quote and renders
// It use the key \`quote\` to replace the child with the loader or the new quote
const fetchAndRender = async () => {
this.replaceChild("quote", () => <Loading />);
this.replaceChild("quote", () => <Loading key="quote" />);

let quote: Quote;
try {
Expand Down Expand Up @@ -214,7 +214,7 @@ async function Spot(this: SeqflowFunctionContext) {}

export async function Main(this: SeqflowFunctionContext) {
const fetchAndRender = async () => {
this.replaceChild("quote", () => <Loading />);
this.replaceChild("quote", () => <Loading key="quote" />);

let quote: Quote;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function Spot(this: SeqflowFunctionContext) {}
export async function Main(this: SeqflowFunctionContext) {
const fetchAndRender = async () => {
this.replaceChild("quote", () => <Loading />);
this.replaceChild("quote", () => <Loading key="quote" />);
let quote: Quote;
try {
Expand Down
7 changes: 6 additions & 1 deletion packages/website/src/pages/GettingStarted_5test.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ In this last part of the tutorial, we will cover how to test our SeqFlow applica

SeqFlow suggests to use `biome` for formatting the code. The configuration file is `biome.json`. The configuration file is already created when the project is created. The configuration file is used to format the code using `biome` formatter. To format the code, run:

```bash
pnpm run biome
```

We discover that the code is not formatted correctly. To fix it, run:

```bash
pnpm run biome:check
```

The above command will check if the code is formatted correctly and will fix it if it is not.

## Unit testing

Expand Down

0 comments on commit 5e01462

Please sign in to comment.