summaryrefslogtreecommitdiff
path: root/examples/with-nanostores/src/components/AdminsSvelte.svelte
diff options
context:
space:
mode:
authorGravatar Withered Flowers <withered-flowers@users.noreply.github.com> 2021-11-22 00:31:42 +0700
committerGravatar GitHub <noreply@github.com> 2021-11-21 11:31:42 -0600
commit1ec3f28b638d1d505e51ce48a1b4abe99df5d73a (patch)
treef87563b3a6ecde6bdb8ea7b0801ddd1d8b7bd0de /examples/with-nanostores/src/components/AdminsSvelte.svelte
parentb92b8ae3edba469d73db8f474e680c2f7648c80a (diff)
downloadastro-1ec3f28b638d1d505e51ce48a1b4abe99df5d73a.tar.gz
astro-1ec3f28b638d1d505e51ce48a1b4abe99df5d73a.tar.zst
astro-1ec3f28b638d1d505e51ce48a1b4abe99df5d73a.zip
Patch: Example Nanostores Update (#1955)
* Mention astro.new in docs (#1935) * Fix - Deprecated nanostores functions createStore and getValue is deprecated in nanostores, changed it to atom and atom.get() * fix: change code to nanostores non-deprecated functions Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
Diffstat (limited to 'examples/with-nanostores/src/components/AdminsSvelte.svelte')
-rw-r--r--examples/with-nanostores/src/components/AdminsSvelte.svelte4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/with-nanostores/src/components/AdminsSvelte.svelte b/examples/with-nanostores/src/components/AdminsSvelte.svelte
index a98444b4f..c6125b53e 100644
--- a/examples/with-nanostores/src/components/AdminsSvelte.svelte
+++ b/examples/with-nanostores/src/components/AdminsSvelte.svelte
@@ -1,10 +1,8 @@
<script>
- import { getValue } from 'nanostores'
-
import { users } from '../store/users.js';
import { counter, increaseCounter, decreaseCounter } from '../store/counter.js';
- const list = getValue(users).filter(user => user.isAdmin);
+ const list = users.get().filter((user) => user.isAdmin);
</script>
<h1>Svelte</h1>