Skip to content

Commit 6767394

Browse files
authored
docs: Prefer const to let (auto generating selectors) (#3094)
1 parent 4d3a017 commit 6767394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/auto-generating-selectors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ type WithSelectors<S> = S extends { getState: () => infer T }
2323
const createSelectors = <S extends UseBoundStore<StoreApi<object>>>(
2424
_store: S,
2525
) => {
26-
let store = _store as WithSelectors<typeof _store>
26+
const store = _store as WithSelectors<typeof _store>
2727
store.use = {}
28-
for (let k of Object.keys(store.getState())) {
28+
for (const k of Object.keys(store.getState())) {
2929
;(store.use as any)[k] = () => store((s) => s[k as keyof typeof s])
3030
}
3131

0 commit comments

Comments
 (0)