There is no dobut that TypeScript’s type checking can prevent bugs even before you run the code. It’s an amazing feature. But did you know that you can turn it on in regular .js
files?
For my commercial projects I mainly use Vue.js. But sometimes when it’s needed I also develop web apps in React. I am no React expert at all, but I want to share my thoughts about similar patterns. Today I’ll focus on how to compensate <slot>
in React.
Recently during the code review, I was debating with my colleagues about extracting some functions as vue filters. Those functions were strictly related to text formatting. In addition, they were used in multiple components. For me, it seemed natural to move those functions to global Vue.filter
and leverage text formatting in a template.
Just a regular day in your developer job. You are checking your tasks for today. A client want’s a gallery view, with buttons. One big central image, and couples of images at the bottom. The user can interact with the gallery using two buttons. One will show the next images, second will show previous ones. An overview of functionality below.
Vue 2.6 gave us new syntax for scoped slots. The v-slot
directive. For me that was a motivation to start using them already.
The directives are commands attached to a DOM element, which allows us to run some logic. If you are using Vue, you must have used v-if
or v-show
for conditional rendering or v-for
for list rendering.
As we can see they are prefixed with v-
prefix.
Recently in my work we had a task to migrate website from classical Linux, Apache, PHP stack to something which won’t require ‘servers’. By severs in this case I mean EC2 instances. The main reason for doing that was to speed up deployment process.
JavaScript offers us more than one way to handle modules. Each of them is dedicated to the specific situation: client or browser. So, let’s dive right in and see how we can use them properly.
This is a feature which is very popular among websites.
There is no doubt that animations are an important part of web design. Computers are used to boolean values. Either something is true or false, right? But for human beings, this is not so simple. We feel strange if things appear out of nowhere. I hope you remember memes with cats being afraid of cucumbers. (If not check links in resources xD). Having said that, in my opinion, the most important use of animation is to present change in a controlled manner.