Skip to content

Commit

Permalink
remove extra example
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandrjet committed Dec 28, 2023
1 parent ed89a22 commit 94e143e
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 1,406 deletions.
1 change: 0 additions & 1 deletion examples/framework-preact-lazy/.codesandbox/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions examples/framework-preact-lazy/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/framework-preact-lazy/.vscode/extensions.json

This file was deleted.

11 changes: 0 additions & 11 deletions examples/framework-preact-lazy/.vscode/launch.json

This file was deleted.

13 changes: 0 additions & 13 deletions examples/framework-preact-lazy/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions examples/framework-preact-lazy/astro.config.mjs

This file was deleted.

19 changes: 0 additions & 19 deletions examples/framework-preact-lazy/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions examples/framework-preact-lazy/public/favicon.svg

This file was deleted.

7 changes: 0 additions & 7 deletions examples/framework-preact-lazy/src/components/Counter.css

This file was deleted.

27 changes: 0 additions & 27 deletions examples/framework-preact-lazy/src/components/Counter.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions examples/framework-preact-lazy/src/components/NumberValue.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions examples/framework-preact-lazy/src/pages/index.astro

This file was deleted.

8 changes: 0 additions & 8 deletions examples/framework-preact-lazy/tsconfig.json

This file was deleted.

4 changes: 0 additions & 4 deletions examples/framework-preact/src/components/Counter.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@
margin-top: 2em;
place-items: center;
}

.counter-message {
text-align: center;
}
8 changes: 7 additions & 1 deletion examples/framework-preact/src/components/Counter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { h, Fragment } from 'preact';
import { lazy, Suspense } from 'preact/compat';
import './Counter.css';

const Message = lazy(async () => import('./Message'));
const Fallback = () => <p>i'm loader, which nobody should see</p>;

export default function Counter({ children, count }) {
const add = () => count.value++;
const subtract = () => count.value--;
Expand All @@ -12,7 +16,9 @@ export default function Counter({ children, count }) {
<pre>{count}</pre>
<button onClick={add}>+</button>
</div>
<div class="counter-message">{children}</div>
<Suspense fallback={Fallback}>
<Message>{children}</Message>
</Suspense>
</>
);
}
Loading

0 comments on commit 94e143e

Please sign in to comment.