Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jozefini committed Feb 18, 2025
1 parent d96cb7b commit 03b7e43
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/store/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @devlab/store

## 1.1.1

### Patch Changes

- Fix docs

## 1.1.0

### Minor Changes
Expand Down
10 changes: 8 additions & 2 deletions packages/store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const settings = createStore({
toggleTheme: (state) => {
state.theme = state.theme === 'light' ? 'dark' : 'light';
}
},
selectors: {
isDarkMode: (state) => state.theme === 'dark'
}
});

Expand All @@ -26,7 +29,7 @@ function App() {

return (
<div data-theme={theme}>
<button onClick={() => settings.dispatch('toggleTheme')}>
<button onClick={() => settings.dispatch.toggleTheme()}>
Toggle Theme
</button>
</div>
Expand All @@ -48,6 +51,9 @@ const todos = createCollection({
toggle: (state) => {
state.completed = !state.completed;
}
},
selectors: {
isCompleted: (state) => state.completed
}
});

Expand All @@ -73,7 +79,7 @@ function TodoItem({ id }: { id: string }) {
<input
type="checkbox"
checked={todo.completed}
onChange={() => todos.dispatch(id, 'toggle')}
onChange={() => todos.key(id).dispatch.toggle()}
/>
<span>{todo.text}</span>
</li>
Expand Down
6 changes: 3 additions & 3 deletions packages/store/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "finalstore",
"license": "MIT",
"version": "1.1.0",
"version": "1.1.1",
"exports": {
"./package.json": "./package.json",
".": {
Expand Down Expand Up @@ -34,10 +34,10 @@
"publishConfig": {
"access": "public"
},
"homepage": "https://github.com/jozefini/react-store",
"homepage": "https://store.jozefini.com",
"repository": {
"type": "git",
"url": "git+https://github.com/jozefini/react-store.git"
"url": "git+https://github.com/jozefini/finalstore.git"
},
"keywords": [
"react",
Expand Down

0 comments on commit 03b7e43

Please sign in to comment.