var please = require('share');
console.log('thank you');

NEW !!!

Tuesday, 24 December, 2019 UTC

JavaScript design patterns #4. Decorators and their implementation in TypeScript

When we are cold, we put on a shirt. If that’s not enough, we put a coat on top. Decorators work similarly. In this article, we discuss the principles of the decorator design pattern and talk about their implementation in TypeScript. We also briefly ... more

Monday, 16 December, 2019 UTC

JavaScript testing #5. Testing hooks with react-hooks-testing-library and Redux

The hooks are an exciting addition to React and undoubtedly one that helps us to separate the logic from the template. Doing so makes the above logic more testable. Unfortunately, testing hooks does not prove to be that straightforward. In this article, ... more

Monday, 9 December, 2019 UTC

JavaScript design patterns #3. The Facade pattern and applying it to React Hooks

The essential thing when approaching design patterns is to utilize them in a way that improves our codebase. The above means that we sometimes can bend them to fit our needs. The Facade design pattern is commonly associated with object-oriented programming. ... more

Monday, 2 December, 2019 UTC

JavaScript design patterns #2. Factories and their implementation in TypeScript

As discussed in the previous part of this series, there are many design patterns out there. Some of them fit well into the JavaScript language, and they are often used. In this article, we discuss the factory method pattern and show some of its use-cases. ... more

Monday, 25 November, 2019 UTC

Exploring the caching in the browser. Clarifying the cache-control header

The performance of our websites is an essential factor to consider. One of the ways to improve it is to cache our resources, and there are many ways to implement it. In this article, we define what caching is and go through the most common approaches. ... more

Monday, 18 November, 2019 UTC

Understanding the useEffect hook in React. Designing custom hooks

Hooks are quite a new feature in React. They seem to simplify how we add logic to our components. When I was starting to use them, most of them seemed straightforward. That didn’t apply to the useEffect hook. It might not be that uncomplicated, and therefore, ... more

Monday, 11 November, 2019 UTC

JavaScript design patterns #1. Singleton and the Module

While having a vibe of a mad genius might be tempting, reinventing the wheel is usually not the best way to approach designing your software. The chances are that somebody already had the same problem as you and solved it in a smart way. Such best practices, ... more

Monday, 4 November, 2019 UTC

Current state of the Concurrent Mode in React

React is constantly expanding, and with that process, there are a few cool features coming. One of them is Concurrent Mode. In this article, we go through its principles and discuss its current state. We also look at what the future might bring. The ... more

Tuesday, 29 October, 2019 UTC

Writing React forms with Formik. Validating data using Yup

Writing a React form without any additional dependencies isn’t much of a challenge itself. The same goes for applying client-side data validation. What might be troublesome is keeping all your forms consistent across a bigger project. If every developer ... more

Monday, 21 October, 2019 UTC

Understanding JavaScript Proxy. Preserving backward compatibility in a library

While learning about various JavaScript features, it is usually not crucial to know them by heart. Sometimes it is very beneficial just to know what’s out there and what can we use it for. One of those features is a JavaScript Proxy . In this article, ... more

Monday, 14 October, 2019 UTC

TypeScript Express tutorial #12. Creating a CI/CD pipeline with Travis and Heroku

Once our application is up and running, we want to deploy it. In this article, we explain what Continous Integration (CI) and Continuous Delivery (CD) is. We use Travis and Heroku as an example, but the knowledge can be used with other tools also. Both ... more

Monday, 7 October, 2019 UTC

Measuring the quality of the User Experience with the User Timing API

The User Experience might be a bit subjective and hard to measure, but there are some parts of it that we can assess. In this article, we explore the User Timing API. With it, we can care for the performance of our applications even more. With a clear ... more

Monday, 30 September, 2019 UTC

Improving our code with pure functions

Our code can get quite complicated. The events handlers are triggered, the HTTP calls are made. We make a lot of stuff happen that we don’t know the outcome of. The more dependencies, the more difficult it is to predict how the function might behave. ... more

Monday, 23 September, 2019 UTC

Regex course – part four. Avoiding catastrophic backtracking using lookahead

Regular expressions can help us solve many different problems. They can also be the source of our headaches. A recent Cloudfare outage happened due to a regular expression that caused CPU to spike to 100% on (…) machines worldwide . In this article, ... more

Monday, 16 September, 2019 UTC

Bug-proofing our application with Error Boundaries and the Strict Mode

We all surely aim for our applications to be bug-proof. A part of it is covering your application with tests. Also, Airbnb claims that 38% of their bugs could have been prevented by TypeScript. We are not going to avoid all issues, unfortunately. A part ... more

Monday, 9 September, 2019 UTC

Installing a Progressive Web App. Writing a Web App Manifest

The JavaScript is present in mobile apps development for quite some time now. Tools like React Native and Cordova have been around for years. Another valuable tool that we can use are Progressive Web Apps, and in this article, we go through the process ... more

Monday, 2 September, 2019 UTC

Internationalization API built into your browser

There is a good chance that the application that you work on supports multiple languages. One of the things this includes is language-sensitive date handling. The most popular library that helps in achieving that is Moment.js. One of the things it handles ... more

Monday, 26 August, 2019 UTC

Introduction to Data-Driven Documents. The basics of D3.js

When it comes to visualizing data, there are quite a few libraries out there. The level of abstraction they introduce varies. Libraries like C3 and Recharts depend on the Data-Driven Documents library – D3 . Learning D3 might mean dealing with more code. ... more

Monday, 19 August, 2019 UTC

Making the job of garbage collector easier by replacing the Map with the WeakMap

ECMAScript 6 introduces a lot of cool features that we are now quite familiar with. In this article, we talk about some of the data structures that it implements. To understand more sophisticated ones like the WeakMap, we also go through the regular ... more

Monday, 12 August, 2019 UTC

The process of rendering a page. Increasing the performance by reducing browser reflow

Rendering a page is a complex process. When you change the DOM structure or modify the CSS, the browser needs to respond to that accordingly. By knowing how this operation takes place, you can alter your approach to increase performance. In this article, ... more

Monday, 5 August, 2019 UTC

Improving our performance, accessibility, and SEO with Lighthouse audits

The internet connections get faster, and the devices that we use for browsing the web get more powerful. On the other hand, our websites get more and more complex, and the connection might fail at some point. Forgetting about performance can seriously ... more

Monday, 29 July, 2019 UTC

Creating a Material Design slider with Web Components. The Shadow DOM concept

As a developer dealing with the Front End technologies, you probably are familiar with attempts to reuse the code in the form of components, for example with libraries like React, Angular and Vue. Web Components implement a similar idea. It consists ... more

Monday, 22 July, 2019 UTC

TypeScript Express tutorial #11. Node.js Two-Factor Authentication

Identity theft is a serious issue nowadays. With so many accidents happening on the web, it is a great time to learn about providing an additional layer of security for our users. In this article, we go through the principles and implementation of Node.js ... more

Monday, 15 July, 2019 UTC

Node.js TypeScript #15. Benefits of the HTTP/2 protocol

The HTTP protocol, having been introduced in 1991, is almost 30 years old. It went through quite a journey since the first documented version, later called 0.9 . In this article, we briefly go through the history of the development of the HTTP protocol ... more

Monday, 8 July, 2019 UTC

Algorithm React uses to update the view. Increasing the performance of a component

In this article, we look into how React checks if the view should be updated. We also use the tools like the shouldComponentUpdate lifecycle function, the PureComponent, and the memoization. We start by acquiring a basic understanding of how React works ... more

Monday, 3 June, 2019 UTC

React SSR with Next.js #2. Prefetching the data with getInitialProps

Today we expand our knowledge to build pages that are more complex and utilize more features from the Next.js framework. In this article, we learn how to fetch initial data for our components on the server side. This way, we can take even more work off ... more

Monday, 27 May, 2019 UTC

React SSR with Next.js #1. Concept of Server Side Rendering & basics of routing

In recent years, the popularity of client-side Single Page Applications skyrocketed, for various reasons. Following its principles, we build pages with the amount of interactivity that we didn’t have before. When using React to render the page the “regular” ... more

Monday, 20 May, 2019 UTC

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

When writing Node.js code, we can approach tasks in many ways. While all of them might work fine, some perform better than others, and as developers, we should strive to make both easily readable and fast applications. In this article, we learn how to ... more

Monday, 13 May, 2019 UTC

Node.js TypeScript #13. Sending data between Worker Threads

The Worker Threads give us quite exciting features when compared to, for example, child processes. In this article, we create our instances of the MessageChannel to communicate with the Worker Threads. Aside from that, we also share the data between ... more

Monday, 6 May, 2019 UTC

Node.js TypeScript #12. Introduction to Worker Threads with TypeScript

The Node.js and JavaScript are often perceived as a single-threaded but in this series, we prove that it is not entirely true. Node.js creates threads when performing Input/Output operations. Not only that, but we can also create additional processes. ... more