Prerequisites: An existing React app.

You can find the full source code @ github:


Install Jest and react-testing-library

yarn add --dev jest @types/jest ts-jest @testing-library/react @testing-library/jest-dom

In the project’s root folder, create a file named jest.config.js and add:

module.exports = {
roots: ["./src"],
transform: {…

A step by step guide on how to install Swift on Ubuntu 20.04.


Download Swift from -> select the Toolchain archive for Ubuntu 20.04

Extract the archive, then open ~/.bashrc and append this line:


Reload .bashrc with source ~/.bashrc

Install the required dependencies. See -> Linux ->…

How to encrypt text

Create a file named encdec.js and paste:

const crypto = require("crypto")const encrypt = (plainText, password) => {
try {
const iv = crypto.randomBytes(16);
const key = crypto.createHash('sha256').update(password).digest('base64').substr(0, 32);
const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);
let encrypted = cipher.update(plainText);
encrypted = Buffer.concat([encrypted,])
return iv.toString('hex') + ':' + encrypted.toString('hex');

A step by step guide on how to create a React project from scratch, with TypeScript and Webpack.

You can find the full source code here:



  • node
  • yarn

Create the project’s folder:

mkdir react-app 
cd react-app

Generate a default package.json file with yarn:

yarn init -y

Install React…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store