Blog

Get the key of an object by its value

January 22, 20233 min readTypeScript

Learn how you can get the key of an object by its value with JavaScript and TypeScript.

Select box component with React and TypeScript

January 21, 20234 min readReact

Learn how to create a reusable select box component with React and TypeScript.

Should we use TypeScript enums?

January 12, 20239 min readTypeScript

Should we use TypeScript enums? Looking to replace your TypeScript enums? Consider union types or POJOs with as const annotations.

Check if a value is a number in JavaScript

November 08, 20224 min readJavaScript

Learn the best way to check if a value is a number in JavaScript.

Conditionally adding attributes and props in React

October 20, 20224 min readReact

Learn how to conditionally add attributes and props in your React components.

Pass style as a prop with React and TypeScript

October 10, 20222 min readReact

Learn how to add the correct TypeScript type for a style prop in React.

Build a context menu with React and TypeScript

October 01, 20226 min readReact

Learn how to use custom hooks and reusable React components to build a context menu.

How to use the React useState hook

September 23, 202212 min readReact

Learn how to manage local state in React components using the useState hook.

The React useState hook and lazy initialization

September 18, 20223 min readReact

Learn how to use an initializer function with useState for expensive state initialization.

Immutable operations on arrays

September 17, 20225 min readJavaScript

Learn how to sort, add, update, and remove from an array in an immutable way in JavaScript.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6