Using Scoped Slots in Vue.js to Abstract Functionality

Let’s start with a short introduction to Vue.js slots concept. Slots are useful when you want to inject content in a specific place of a component. Those specific places that you can define are called slots.

For example, you want to create a wrapper component that is styled in a specific way but you want to be able to pass any content to be rendered inside that wrapper (it might be a string, a computed value, or even another component).


How To Build a Word Counter App

We have all written essays during our school days. There was always a minimum word count - 250, 500 words - that we needed to meet before submitting. Before I had a computer at home I used to count words manually. Once my parents got me one, discovering Microsoft Word was like magic. I didn't know programming then, so I was amazed at everything that MS Word did.

One of the features that I really liked was called "Word Count". You could select any piece of text and click on Tools > Word Count to see some interesting statistics such as number of characters, words, and paragraphs about your selected piece of text. I loved it then and I'm even using it right now as I am drafting this article inside Google Sheets. I figured I'd take a crack at writing one myself.