angular-tetris
angular-tetris copied to clipboard
State adapt
Branched off of https://github.com/trungk18/angular-tetris/pull/50
But this should build because it removes Akita. Unless something else is wrong.
I originally didn't plan on creating a PR, so I have some changes in here you may not like. I got rid of _ variable prefixes, for example.
There were a few places I needed to synchronously access state, which I handled with a quick hack using take(1)).subscribe(. For me to get rid of these, I would have to refactor the components too, not just the stores. This could be a fun project, making the whole thing 100% reactive. I could use signals too, where I think it makes sense.
For now I am just updating with these PRs over in my fork, so I thought I'd share in case you wanted anything.
Oh and I had to turn on strictNullChecks for StateAdapt type inference to work correctly.
Here's a YouTube video I made while refactoring this https://www.youtube.com/watch?v=sUfahKhzZzc