Category JavaScript

VS Code Shortcuts for Mac/Windows/Linux

VS Code is a free and simple source code editor with powerful developer tooling, like IntelliSense code completion and debugging. I already wrote an article about “VS Code Tricks – How To Work Faster”, but then I also found an extremely helpful list of shortcuts for Mac, Windows, and Linux. I hope they will make […]

VS Code Tricks – How To Work Faster

VS Code is a free and simple source code editor with powerful developer tooling, like IntelliSense code completion and debugging. Let’s have a look at a few tricks we can use to make our development faster and more pleasant. As I’m working on Mac on a daily basis, I will use a cmd  button, but […]

How To Use Memoization in JS and React?

First things first, Memoization is caching. But “caching” is a general term, and memoization is a specific form of caching.It is an optimization technique, which speeds up apps by caching the results of function calls and returning the stored result when the same arguments are supplied again. When you should apply Memoization? It can perform […]

How To Write A Better React Code

“The first draft of anything is shit” Said Ernest Hemingway, and even if this guy had nothing to do with React, or even Commodore, he knew exactly that the first creative act, is almost always, not well-thought-out and hard to understand by anybody except the author. I suppose this is a great place to start […]

React vs Vue – A Quick Comparison

One of the hottest battles on the front-end market is a battle between React and Vue. Both are easy to learn, easy to use, efficient, and exceptionally fast. Both are also: view libraries component-based using virtual DOM building native apps very flexible generating clean code So what makes one better than another? Here are the […]

Getting Started with GatsbyJS + Styled Components + Storybook

Introduction Let me show you how to use GatsbyJS with Styled Components and Storybook. Gatsby is a framework generator built with React and GraphQL. This is a static-site generator which helps you build blazing fast websites and apps. To front-end side, I will use Styled Components – the library which allows writing CSS styled in […]

Three advantages of using TypeScript in your React project

TypeScript has grown significantly over the past two years. In the first quarter of 2019, it is one of the fastest growing languages and it sits at the top of languages compiled to JS. This trend is clearly visible in the results of a The State of JavaScript survey. Among 20 000 of respondents, 80% […]

Effective Unit Testing of React Components (Part 3)

Welcome to the last of three-part series on unit testing of React Components. This time I will show how to use Jest and Enzyme for testing of container component. I won’t get into details that were already described, so go ahead and start with reading previous parts (if you haven’t already): Environment and process overview […]

Effective Unit Testing of React Components (Part 2)

This time I will show you how defining the component contract looks in practice and how to represent it with actual Jest & Enzyme unit tests. This is the second part of series on unit testing React components with Jest & Enzyme. If you missed the first part, be sure to check it out first. […]

Moving best (S)CSS practices to styled-components – part 1

Styled-components became a really powerful library for creating styles in React applications. But if you are a front-end developer and you know good practices to create styles in a traditional way (with BEM methodology or by using SASS preprocessor for example) you may experience some difficulties at the beginning of your journey with this approach. […]