Skip to content

Commit

Permalink
Merge pull request #8 from t-miller/feat/support-svelte-4
Browse files Browse the repository at this point in the history
feat: Indicate support for Svelte 4
  • Loading branch information
bryanmylee authored Aug 10, 2023
2 parents 63c6309 + 543ae4a commit cd21476
Show file tree
Hide file tree
Showing 4 changed files with 1,648 additions and 1,579 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ If the parent store is nullable, then the child store will also be nullable.

```ts
type User = {
name: {
first: string;
last: string;
};
relations: {
partner?: User;
};
name: {
first: string;
last: string;
};
relations: {
partner?: User;
};
};

const maybeUser = writable<User | undefined>(undefined);
Expand Down Expand Up @@ -152,14 +152,14 @@ One important method to reduce clutter on your component is to extract functiona

```js
export const trackClicks = (node, clicks) => {
const listen = () => {
clicks.update(($clicks) => $clicks + 1);
};
node.addEventListener('click', listen);
return {
destroy() {
node.removeEventListener('click', listen);
},
};
const listen = () => {
clicks.update(($clicks) => $clicks + 1);
};
node.addEventListener('click', listen);
return {
destroy() {
node.removeEventListener('click', listen);
},
};
};
```
Loading

0 comments on commit cd21476

Please sign in to comment.