fix persistence issue for fresh installation
This commit is contained in:
parent
a390bc7615
commit
0af570848a
2 changed files with 20 additions and 3 deletions
13
README.md
13
README.md
|
@ -1,6 +1,17 @@
|
||||||
# Tauri + Solid + Typescript
|
# Tauri + Solid + Typescript
|
||||||
|
|
||||||
This template should help get you started developing with Tauri, Solid and Typescript in Vite.
|
This is a side project to reimplement the NYT game Connections, but with a feature to pin words so they are unaffected by Shuffle. I also wanted to make some UI improvements over the connections archive app I have been using on my phone.
|
||||||
|
|
||||||
|
I made this hoping to get some exposure to Tauri and SolidJS.
|
||||||
|
|
||||||
|
## Dev setup
|
||||||
|
|
||||||
|
`npm i` should install everything you need.
|
||||||
|
`npm run` will list the possible commands:
|
||||||
|
- `start` / `dev`: live development
|
||||||
|
- `build`: bundle web assets to `/dist`
|
||||||
|
- `serve`: serve web assets locally
|
||||||
|
- `tauri`: send commands to tauri CLI ([reference](https://v2.tauri.app/reference/cli/))
|
||||||
|
|
||||||
## Recommended IDE Setup
|
## Recommended IDE Setup
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,15 @@ export default function useAppModel() {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
function setSolution(id: number, guesses: number) {
|
function setSolution(id: number, guesses: number) {
|
||||||
setStore("solutions", id, {
|
const nextSolutions = [
|
||||||
|
...(store.solutions ?? []),
|
||||||
|
];
|
||||||
|
nextSolutions[id] = {
|
||||||
id,
|
id,
|
||||||
guesses
|
guesses,
|
||||||
|
}
|
||||||
|
setStore({
|
||||||
|
solutions: nextSolutions
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue