Matching Cards
- Day: 3
- Link: https://github.com/pontakornth/matching-card
Currently there is no live demo at the time I post this. I don't think that it's worth creating another domain (obviously on vercel.com) just to host a simple project like this.
I learned Vue composition API with this project. It's quite difficult to setup but it's worth
if your app is going to be composed of resuable modules. I can encapsulate the game algorithm in the useXXX
similar to the React hook. It doesn't work the same but it's similar for me. The downside is about the array. It cannot be set directly. So, I make it a children of another reactive
property. Then, I use computed
to make it look like normal array. It's a bit hacky.
Yesterday, there is no syntax hightlighting in this blog. It should be present in this article now.
computed()