Skip to content

Commit f420a24

Browse files
fix(website): fix local storage usage
1 parent 32f57e4 commit f420a24

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/overmind-website/guides/beginner/02_definingstate.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Not all state should be explicitly defined. Some state are values based off of o
5656
h(Example, { name: "guide/definingstate/derived" })
5757
```
5858

59+
```marksy
60+
h(TypescriptNotice, null, "Is is important that you define your state with a **type**, do **NOT** use an **interface**")
61+
```
62+
5963
The first argument of the function is the state the derived function is attached to. A second argument is also passed and that is the root state of the application, allowing you to access whatever you would need. Two important traits of the derived function is:
6064

6165
1. The state accessed is tracked

packages/overmind-website/src/overmind/effects.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const router = (() => {
2222
const validTypescriptQuery = ['true', 'false']
2323
let currentPath
2424
let currentQuery: Query = {
25-
view: storage.get('theme'),
26-
typescript: storage.get('typescript'),
25+
view: String(storage.get('theme')),
26+
typescript: String(storage.get('typescript')),
2727
}
2828
let currentHash = location.hash
2929

0 commit comments

Comments
 (0)