This is a weekly roundup of awesome DEV comments that you may have missed. You are welcome and encouraged to boost posts and comments yourself using the #bestofdev tag.
This is how a Vue component looks like:
So every component can have its own template styling and scripts.
Just like mounted there are other lifecycle hooks like beforeCreate,created, beforeMount, mounted , and some more.
Vue took best of the things from Angular and React.
(I've wrote this considering Vue 2, I haven't used vue 3 yet)
Terror … when you feel something behind you, you hear it, you feel it's breath against you, and you turn around, there's nothing there.
~ Stephen King
The worst terrors are those you know exist, and yet cannot see.
Like invisible characters that choke the life out of your YAML parser.
this past month we received exactly 500 pull requests.
Too bad it couldn't be a nice round number, like 512.
A React component is essentially just a function that returns HTML. It can accept arguments if necessary, in the form of props, and can use those to determine what it renders.
While a component can technically be a class, it still makes more sense to think of it as a function, and with the advent of Hooks it's probably not necessary to build any one component as a class nowadays.
See you next week for more great comments ✌