Skip to content

Commit

Permalink
fixed typo mistakes in no-guard.md (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
focusbytheway authored Jun 14, 2022
1 parent 33b38ec commit 4008b66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rules/no-guard/no-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Any `guard` call could be replaced with `sample` call.

```ts
// πŸ‘Ž could be replaced
guard({ clock: trigger, soruce: $data, filter: Boolean, target: reaction });
guard({ clock: trigger, source: $data, filter: Boolean, target: reaction });

// πŸ‘ makes sense
sample({ clock: trigger, source: $data, filter: Boolean, target: reaction });
Expand All @@ -16,15 +16,15 @@ Nice bonus: `sample` is extendable. You can add transformation by `fn`.
// πŸ‘Ž could be replaced
guard({
clock: trigger,
soruce: $data.map((data) => data.length),
source: $data.map((data) => data.length),
filter: Boolean,
target: reaction,
});

// πŸ‘ makes sense
sample({
clock: trigger,
soruce: $data,
source: $data,
filter: Boolean,
fn: (data) => data.length,
target: reaction,
Expand Down

0 comments on commit 4008b66

Please sign in to comment.