fix persistence issue for fresh installation

This commit is contained in:
Joshua Seigler 2025-05-20 19:22:31 -04:00
parent a390bc7615
commit 0af570848a
2 changed files with 20 additions and 3 deletions

View file

@ -1,6 +1,17 @@
# 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

View file

@ -25,9 +25,15 @@ export default function useAppModel() {
}
);
function setSolution(id: number, guesses: number) {
setStore("solutions", id, {
const nextSolutions = [
...(store.solutions ?? []),
];
nextSolutions[id] = {
id,
guesses
guesses,
}
setStore({
solutions: nextSolutions
})
}