diff --git a/examples/astro-nanostores/src/components/AdminsPreact.jsx b/examples/astro-nanostores/src/components/AdminsPreact.jsx
index 6c4a126eae..93fecd8782 100644
--- a/examples/astro-nanostores/src/components/AdminsPreact.jsx
+++ b/examples/astro-nanostores/src/components/AdminsPreact.jsx
@@ -1,7 +1,7 @@
import { h, Fragment } from 'preact';
-import { useStore } from 'nanostores/preact'
+import { useStore } from 'nanostores/preact';
-import { admins } from '../store/admins.js'
+import { admins } from '../store/admins.js';
import { counter, increaseCounter, decreaseCounter } from '../store/counter.js';
const AdminsPreact = () => {
@@ -12,7 +12,9 @@ const AdminsPreact = () => {
<>
Preact
- {list.map(user => - {JSON.stringify(user, null, 2)}
)}
+ {list.map((user) => (
+ - {JSON.stringify(user, null, 2)}
+ ))}
Counter
@@ -22,6 +24,6 @@ const AdminsPreact = () => {
>
);
-}
+};
-export default AdminsPreact
\ No newline at end of file
+export default AdminsPreact;
diff --git a/examples/astro-nanostores/src/components/AdminsReact.jsx b/examples/astro-nanostores/src/components/AdminsReact.jsx
index 4feb8c0fdd..a03df1f472 100644
--- a/examples/astro-nanostores/src/components/AdminsReact.jsx
+++ b/examples/astro-nanostores/src/components/AdminsReact.jsx
@@ -1,7 +1,7 @@
-import React from 'react'
-import { useStore } from 'nanostores/react'
+import React from 'react';
+import { useStore } from 'nanostores/react';
-import { admins } from '../store/admins.js'
+import { admins } from '../store/admins.js';
import { counter, increaseCounter, decreaseCounter } from '../store/counter.js';
const AdminsReact = () => {
@@ -11,7 +11,9 @@ const AdminsReact = () => {
<>
React
- {list.map(user => - {JSON.stringify(user, null, 2)}
)}
+ {list.map((user) => (
+ - {JSON.stringify(user, null, 2)}
+ ))}
Counter
@@ -22,6 +24,6 @@ const AdminsReact = () => {
>
);
-}
+};
-export default AdminsReact;
\ No newline at end of file
+export default AdminsReact;
diff --git a/examples/astro-nanostores/src/store/admins.js b/examples/astro-nanostores/src/store/admins.js
index 6a0846dfe4..91215470b2 100644
--- a/examples/astro-nanostores/src/store/admins.js
+++ b/examples/astro-nanostores/src/store/admins.js
@@ -1,11 +1,7 @@
-import { createDerived } from 'nanostores'
+import { createDerived } from 'nanostores';
-import { users } from './users.js'
+import { users } from './users.js';
-const admins = createDerived(users, list =>
- list.filter(user => user.isAdmin)
-)
+const admins = createDerived(users, (list) => list.filter((user) => user.isAdmin));
-export {
- admins
-}
\ No newline at end of file
+export { admins };
diff --git a/examples/astro-nanostores/src/store/counter.js b/examples/astro-nanostores/src/store/counter.js
index 90cecd5605..a57d8e2c33 100644
--- a/examples/astro-nanostores/src/store/counter.js
+++ b/examples/astro-nanostores/src/store/counter.js
@@ -1,19 +1,15 @@
-import { createStore, getValue } from 'nanostores'
+import { createStore, getValue } from 'nanostores';
const counter = createStore(() => {
- counter.set(0)
-})
+ counter.set(0);
+});
function increaseCounter() {
- counter.set(getValue(counter) + 1)
+ counter.set(getValue(counter) + 1);
}
function decreaseCounter() {
- counter.set(getValue(counter) - 1)
+ counter.set(getValue(counter) - 1);
}
-export {
- counter,
- increaseCounter,
- decreaseCounter
-}
\ No newline at end of file
+export { counter, increaseCounter, decreaseCounter };
diff --git a/examples/astro-nanostores/src/store/users.js b/examples/astro-nanostores/src/store/users.js
index af517e7ad7..719f75cd1b 100644
--- a/examples/astro-nanostores/src/store/users.js
+++ b/examples/astro-nanostores/src/store/users.js
@@ -1,30 +1,27 @@
-import { createStore, getValue } from 'nanostores'
+import { createStore, getValue } from 'nanostores';
const users = createStore(() => {
users.set([
{
name: 'Imanadmin',
age: 2,
- isAdmin: true
+ isAdmin: true,
},
{
name: 'Imnotadmin',
age: 35,
- isAdmin: false
+ isAdmin: false,
},
{
name: 'Wowsomuchadmin',
age: 3634,
- isAdmin: true
+ isAdmin: true,
},
- ])
-})
+ ]);
+});
const addUser = function addUser(user) {
- users.set([...getValue(users), user])
-}
+ users.set([...getValue(users), user]);
+};
-export {
- users,
- addUser
-}
\ No newline at end of file
+export { users, addUser };