Pure Functions in JavaScript: A Beginner's Guide
A pure function always returns the same value for the same arguments and produces no side effects.
Dmitri Pavlutin Blog is a place to learn about JavaScript, CSS, React, Vue and more on Frontend development
A pure function always returns the same value for the same arguments and produces no side effects.
Record type simplifies typing objects in TypeScript. Let's see how you can benefit from it.
{/* Comment */} is the usual way to write comments in React. But there are 2 better ways to comment you just have to know.
An enum is a set of named constants. The plain object, frozen object, proxied object or class-based are the 4 ways to create enums in JavaScript.
React forwardRef() is a tool for passing refs to child components. Discover how to use it with ease in this comprehensive tutorial.
Are you struggling to understand TypeScript function types? Look no further! This comprehensive guide covers everything you need to know.
How to use v-model to bind form input elements like text input, textarea, select, checkbox, radio in Vue.
ref() is a Vue composition API function that creates refs: small reactive values.
How to access environment variables in JavaScript using process.env and expose them to the browser runtime using bundlers like Vite and webpack.
What are the main differences between ref() and reactive()? And when to use one or another?
How to correctly destructure props object in a Vue component while maintaining the reactivity.
How to use triangulation technique to guide the creation of generic code in test-driven development.
nextTick(callback) executes the callback when the DOM has been updated.
How programming to an interface can make your application easier to change in the future.
array.flatMap() is a method on the array that let's you map elements a littler smarter.
Object.groupBy() and Object.groupByToMap() methods let you group an array by certain criteria.
How to access the meta information (module URL, etc.) of an ES module in JavaScript.
How to import JSON data directly into an ES module.
How to trim (aka remove whitespaces and line terminators) from strings in JavaScript.
Function overloading in TypeScript lets you define functions that can be called in multiple ways.
How to debounce and throttle watchers and event handlers in Vue components.
How to use v-if, v-show and :class to show/hide elements in Vue.
What's the difference between sparse and dence arrays in JavaScript
How to initialize an array with initial values in JavaScript using array.fill(), Array.from(), or array.map()
Covariance and contravariance are the concepts behind the subtyping of composable types.
The higher-order function accept as arguments or return other functions.
How to use TypeScript to type React components: validate props, mark props as optional.
Index signatures in TypeScript let's you annotate objects of unknown structure.
How to use useReducer() hook to manage complex state: initial state, action object, dispatch, reducer in React.
What is the difference between unknown and any types in TypeScript.
The React context provides data to components no matter how deep they are in the components hierarchy.
How to use the Promise.any() to get the first fulfilled promise from an array of promises.
How to remove properties from an object in JavaScript using the delete operator or object destructuring with rest syntax.
Is there any difference between using 'return await promise' and 'return promise' in asynchronous JavaScript functions?
How to use Promise.allSettled() to perform parallel async operations and collect the promises statuses into an array.
How to use fetch() API to load and post JSON data.
What's the difference between promise.then(fn, fn) and promise.then(fn).catch(fn) when using JavaScript promises?
The post that I had wanted to read myself to understand promises.
How to use Promise.all() to perform parallel async operations in a fail-fast manner.
In this guide you'll find what are component props in React and how to use them.
How to speed up UI updates by prioritizing updates using React useTranstion() hook.
How to declare, initialize, assign and read JavaScript variables using const, let and var statements.
How to use import(pathToModule) to dynamically import ES (ECMAScript) modules in JavaScript.
How and when to use React.useMemo() hook to improve the performance of React components.
How to correctly cleanup async side-effects in React when the component unmounts or updates.
What is the reason that Math.max() utility function when being called without arguments returns -Infinity.
How to debounce and throttle callbacks in React using useCallback() and useMemo() hooks.
What are the differences between function declarations and function expressions in JavaScript.
How to Use ES (ECMAScript) Modules in Node.js environment.
Solving a mystery of how parseInt() parses small float numbers in JavaScript.