Skip to content

Commit 05147a5

Browse files
committed
✏️ Fix Readme brackets
1 parent a1d9e76 commit 05147a5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ interface Events extends StoreonEvents<State> {
6969
}
7070

7171
let counter = (store: Store<State>) => {
72-
store.on("@init", () => ({ count: 0 }))
73-
store.on("inc", ({ count }) => ({ count: count + 1 }))
72+
store.on('@init', () => ({ count: 0 }))
73+
store.on('inc', ({ count }) => ({ count: count + 1 }))
7474
store.on('set', (_, event) => ({ count: event}))
7575
};
7676

@@ -99,35 +99,35 @@ Import `getStore` function from our `@storeon/svelte` module and use it for gett
9999

100100
```html
101101
<script>
102-
import { getStore } from "@storeon/svelte";
102+
import { getStore } from '@storeon/svelte';
103103
104-
const { count, dispatch } = getStore("count");
104+
const { count, dispatch } = getStore('count');
105105
106106
function increment() {
107-
dispatch("inc");
107+
dispatch('inc');
108108
}
109109
</script>
110110

111111
<h1>The count is {$count}</h1>
112112

113-
<button on:click="{increment}">+</button>
113+
<button on:click={increment}>+</button>
114114
```
115115
Using typescript you can pass `State` and `Events` interfaces to `getStore` function to be full type safe
116116
```html
117117
<script lang="typescript">
118-
import { getStore } from "@storeon/svelte";
118+
import { getStore } from '@storeon/svelte';
119119
import { State, Events } from './store'
120120
121-
const { count, dispatch } = getStore<State, Events>("count");
121+
const { count, dispatch } = getStore<State, Events>('count');
122122
123123
function increment() {
124-
dispatch("inc");
124+
dispatch('inc');
125125
}
126126
</script>
127127

128128
<h1>The count is {$count}</h1>
129129

130-
<button on:click="{increment}">+</button>
130+
<button on:click={increment}>+</button>
131131
```
132132

133133
## Usage with [@storeon/router](https://github.com/storeon/router)
@@ -136,7 +136,7 @@ If you want to use the @storeon/svelte with the `@storeon/router` you should imp
136136
#### `store.js`
137137
```js
138138
import createStore from 'storeon'
139-
import { createRouter } from "@storeon/router";
139+
import { createRouter } from '@storeon/router';
140140

141141
const store = createStore([
142142
createRouter([
@@ -162,8 +162,8 @@ And use it like:
162162
#### `Child.svelte`
163163
```html
164164
<script>
165-
import { getStore } from "@storeon/svelte";
166-
import router from "@storeon/router"
165+
import { getStore } from '@storeon/svelte';
166+
import router from '@storeon/router'
167167
168168
const { [router.key]: route } = getStore(router.key)
169169
</script>

0 commit comments

Comments
 (0)