Skip to content

Commit

Permalink
Update mandatory binding examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zerobias authored Nov 6, 2024
1 parent 6b3366f commit 83c04d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/mandatory-scope-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This ensures `Fork API` compatibility and allows writing isomorphic code for SSR
```tsx
const increment = createEvent();

// πŸ‘ Event usage is wrapped with `useEvent`
// πŸ‘ Event usage is wrapped with `useUnit`
const GoodButton = () => {
const incrementEvent = useUnit(increment);

return <button onClick={incrementEvent}>+</button>;
};

// πŸ‘Ž Event is not wrapped with `useEvent` - component is not suitable for isomorphic SSR app
// πŸ‘Ž Event is not wrapped with `useUnit` - component is not suitable for isomorphic SSR app
const BadButton = () => {
return <button onClick={increment}>+</button>;
};
Expand Down

0 comments on commit 83c04d6

Please sign in to comment.