diff --git a/README.md b/README.md index d33749e..ad35cb1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/useAppModel.ts b/src/useAppModel.ts index 0cb5867..bd76be4 100644 --- a/src/useAppModel.ts +++ b/src/useAppModel.ts @@ -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 }) }