Skip to content

Commit

Permalink
docs(readme): move state down, to not confuse
Browse files Browse the repository at this point in the history
  • Loading branch information
sebkolind committed Dec 4, 2023
1 parent ec1b4ff commit e78104d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ One is in alpha and is under heavy development. There might be breaking changes
```js
import { mount, div, button } from 'one'

const state = { count: 0 }
const view = function ({ state }) {
return div([
p(`Count: ${state.count}`),
Expand All @@ -18,6 +17,8 @@ const view = function ({ state }) {
])
}

const state = { count: 0 }

mount({
state,
view,
Expand Down

0 comments on commit e78104d

Please sign in to comment.