Back

Vue3 composition API makes you think less

Vue3 composition API makes you think less

I recently had an exam wherein I have to implement a tictactoe app, and the webapp for the test was forcing me to use Vue2. This is one of those tests where the code editor is in your webapp you have a REPL that takes longer to load and does not allow you to copy paste from your editor.

But I digress, "Oh it's not gonna be that hard" I naively thought. I haven't used options API for more than a year but it won't be that hard right? I was utterly wrong, took me more than 3 hours to implement the whole app. I then thought, am I that bad of a programmer? Then I tried implementing the app using Vue3 which was what I was comfortable to begin with, it took me less than 30 mins.

So I thought, oh maybe because I solved it before that was what's making it easier the second time. Here me out. My "OPINION" on this is that Vue3 using composition API helps you think better ways of solving the problem directly and not worry much on the technical implementations, you worry on the descriptive implementations.

The reactivity is straightforward. If I update the ref value, that means it's updated. That's it.

Here is the link to the tictactoe on github Here is the link to the actual tictactoe I deployed on Vercel: