Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioCoser committed Mar 29, 2024
1 parent 0d44c7c commit 00a88c4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- run: npm ci
- run: npm test run

publish:
npm-publish:
needs: test
runs-on: ubuntu-latest
steps:
Expand All @@ -32,7 +32,7 @@ jobs:
- run: npm run release ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release:
github-release:
needs: publish
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion examples/async-counter-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"typescript": "^4.9.3"
},
"dependencies": {
"doom-reactive-state": "^0.5.1"
"doom-reactive-state": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion examples/cdn-package/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://github.com/AlessioCoser/doom-reactive-state/releases/download/0.6.2/doom-reactive-state.global.js"></script>
<script src="https://github.com/AlessioCoser/doom-reactive-state/releases/download/1.0.1/doom-reactive-state.global.js"></script>
</head>
<body>
<script type="application/javascript">
Expand Down
2 changes: 1 addition & 1 deletion examples/reactive-state-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"doom-reactive-state": "^0.5.1"
"doom-reactive-state": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion examples/simple-counter-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"typescript": "^4.9.3"
},
"dependencies": {
"doom-reactive-state": "^0.5.1"
"doom-reactive-state": "^1.0.1"
}
}
17 changes: 7 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,17 @@ You can find some examples here: [./examples](./examples)

This is a simple increment counter component
```javascript
const { signal, Div, H2, Span, Button } = require("doom-reactive-state")
const { signal, Div, H2, Button, Span, d } = require("doom-reactive-state")

function App() {
const [count, setCount] = signal(1)
const App = () => {
const [count, setCount] = signal(0)

const onclick = () => setCount(count() + 1)

return Div({ children: [
H2({ children: [
"Count: ",
Span({ children: [() => `${count()}`] })
]}),
Button({ onclick, children: ['increment'] }),
]})
return Div([
H2(['Count: ', Span(d`${count}`)]),
Button({ onclick }, 'increment'),
])
}

document.body.appendChild(App())
Expand Down

0 comments on commit 00a88c4

Please sign in to comment.