How I Got into IT with Minh Nguyen

Description

This is the second episode of the “Remarkable Podcast” with host Mark and guest Minh Nguyen.

Minh is an IT manager focused on making organizations more efficient.

We talk about how Minh got into IT, from his experience starting from the bottom to becoming an IT manager today.

Lern and Yarn

This article goes over how to set up a Lerna monorepo with Yarn workspaces.

Lerna

Create a new Lerna monorepo with lerna init:

$ npx lerna init

Initialized Lerna files should look like:

$ tree
.
├── lerna.json
├── package.json
└── packages
1 directory, 2 files

Optional: To enable independent versioning mode in lerna.json:

Yarn

Enable Yarn workspaces in package.json:

Then add npmClient and useWorkspaces to lerna.json:

Now when you run yarn install, Yarn bootstraps and hoists node modules to the project root directory:

$ yarn

This means that devDependencies shared across packages can be saved to the project root package.json:

$ yarn add --dev eslint -W

Resources

Check out the example repository lerna-template.

This article was originally published on remarkablemark.org on September 18, 2021.

This article goes over the React useEffect hook lifecycle:

  • Mount
  • Update
  • Unmount

Prerequisites

Import useEffect:

import { useEffect } from 'react';

Mount

Component did mount:

useEffect(() => {
console.log('mount');
}, []);

Update

Component did update:

useEffect(() => {
console.log('update');
});

Component did update on data change:

useEffect(() => {
console.log('update on data change');
}, [data]);

Component will unmount or did update on data change:

useEffect(() => {
return () => {
console.log('update on data change or unmount');
};
}, [data]);

Unmount

Component will unmount:

useEffect(() => {
return () => {
console.log('unmount');
};
}, []);

This article was originally published on remarkablemark.org on August 22, 2021.

This article goes over how to add Redux to a React TypeScript app.

Video

Watch YouTube video:

Demo

CodeSandbox demo:

Prerequisites

Given an app bootstrapped by Create React App:

$ npx create-react-app my-app --template typescript && cd my-app

Install

Install the dependencies:

With npm:

$ npm install @reduxjs/toolkit @types/react-redux…

remarkablemark

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