Building component library with Docz and Lerna
Component libraries are all the rage these days, with many companies rolling out their own solutions or sticking to a bunch of open source alternatives. Leveraging a component library for UI development, particularly in large teams, has a lot of cool benefits. It allows to take full advantage of modular and reusable UI components, which brings increased speed of development and unifies styles across multiple teams and apps.
It is quite common to use Set to remove duplicate items from an array. A bit less-known fact is that Map data structure can also be used to filter out duplicated because it maintains key uniqueness, meaning that there can be no more than one key-value pair with the same key.
Map data structure is a relatively less known addition of ES6 to the language. It has a few advantages over objects when it comes to storing collections of key-value pairs. One of the interesting use cases is simplifications of React components that render different JSX based on state variables that are often changing.
The most common mistakes when using React
Answering React-related questions on Stack Overflow, I've noticed that there are a few main categories of issues people have with the library. I've decided to write about the most common ones and show how to handle them in hopes that it'll be helpful to those new to React or anyone in general, who's struggling with its basic concepts.
Testing Firestore locally with Firebase emulators
When starting with Firestore testing a question arises - do I really have to run my tests against the actual database? Luckily the answer is no. Firestore emulators can be setup to allow running tests against a local instance of Firestore database.
What is the type of NaN?
Scaffolding Redux boilerplate with code generators
Building on the knowledge from the previous post, we dive deeper into generating code with a more advanced example - scaffolding Redux boilerplate.
Speed up your React developer workflow with code generators
As React developers we often need to setup new components, hook them up into the existing infrastructure or scaffold an application. That's a lot of repeated manual work, which even though doesn't happen that often, can be quite tedious and frankly, boring. The good news is that it can be easily automated.
Testing React components: Enzyme vs React Testing Library
This post compares approaches of two of the most popular testing libraries for React: Enzyme and React Testing Library. A special attention is paid to testing async component logic.
Build your own unbeatable Tic Tac Toe with React Hooks and Styled Components
Building a game with React Hooks is both fun and a bit challenging experience. It helps to deepen the understanding of how React's lifecycle works.
Adding a blog to your Django website
Nowadays there exist a ton of solutions for easily creating and hosting blogs. However, sometimes you have an already existing website and just want to add a blog to it, without using other tools than the ones already at hand. In this article we'll go through the process and see how easy and straightforward it is.