From 8740dda99b81f7f279d9ad2e816bb658bba9ad3e Mon Sep 17 00:00:00 2001 From: Itamar Rocha Filho Date: Sun, 24 Dec 2023 11:28:46 -0300 Subject: [PATCH] Fix code markdown syntax --- docs/developing/islands/en.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/developing/islands/en.md b/docs/developing/islands/en.md index b9247312..194e3817 100644 --- a/docs/developing/islands/en.md +++ b/docs/developing/islands/en.md @@ -91,23 +91,23 @@ Within a component, if the state is only used locally, you can use the `useSignal` hook to create these elements that can be used in the function body or in the JSX returned, as in the example below. -````tsx +```tsx import { useSignal } from "@preact/signals"; export default function Counter() { - const count = useSignal(0) + const count = useSignal(0); return (
- {count} -
- ) + ); } ``` @@ -120,7 +120,7 @@ Signals are also a great way of sharing state between islands, since one can pub To use signals, ```tsx import { signal } from '@preact/signals'; -```` +``` Now, use the global scope to create, mutate and subscribe to a signal: