Skip to content

Commit

Permalink
Merge pull request #319 from PatricNox/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
championswimmer authored Sep 1, 2023
2 parents f54a970 + 423fdb0 commit 29c027e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@ const module = {
}
```

## Parameters inside a getter

In order to handle parameters, simply return a function like so:

```
get getUser() {
return function (id: number) {
return this.users.filter(user => user.id === id)[0];
}
}
```

### Putting into the store

Use the modules just like you would earlier
Expand Down

0 comments on commit 29c027e

Please sign in to comment.