Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for client:only hydrator #935

Merged
merged 16 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typo fix
  • Loading branch information
Tony Sullivan committed Aug 17, 2021
commit 1264f30eb1199229033391373b12d09df25b5c27
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

<script>
import './logResize';

let count = parseInt(localStorage.getItem('test:count')) || 0;
$: localStorage.setItem('test:count', count);

function add() {
count += 1;
}

function subtract() {
count -= 1;
}
</script>

<div class="counter">
<button on:click={subtract}>-</button>
<pre>{ count }</pre>
<button on:click={add}>+</button>
</div>

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import PersistantCounter from '../components/PersistantCounter.svelte';
import PersistentCounter from '../components/PersistentCounter.svelte';
---
<html>
<head><title>Dynamic pages</title></head>
<body>
<PersistantCounter client:only />
<PersistentCounter client:only />
</body>
</html>