We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent add7d9f commit a51edbeCopy full SHA for a51edbe
src/routes/concepts/components/basics.mdx
@@ -129,12 +129,16 @@ function MyComponent() {
129
const [count, setCount] = createSignal(0);
130
return (
131
<div>
132
- <Show when={count() <= 5} fallback={<div>Count limit reached</div>}>
133
- <p>Count: {count()}</p>
134
- <button onClick={() => setCount((prev) => prev + 1)}>
135
- Increment
136
- </button>
137
- </Show>
+ {count() > 5 ? (
+ <div>Count limit reached</div>
+ ) : (
+ <>
+ <p>Count: {count()}</p>
+ <button onClick={() => setCount((prev) => prev + 1)}>
138
+ Increment
139
+ </button>
140
+ </>
141
+ )}
142
</div>
143
);
144
}
0 commit comments