Posts / Tags / javascript
Tag · 17 articles

#javascript

Articles

NPM: What are project dependencies?

The difference between dependencies, devDependencies, and peerDependencies in a package.json, and when to use each type in a Node.js project.

Javascript NodeJS React

Making React Fast: Tips on Optimizing ReactJS

React performance from the ground up. How the reconciler works, when re-renders hurt, and the tools (memo, key, useMemo) for fixing jank.

React Javascript

Intro to Functional Programming

Functional programming built around immutable data, pure functions, and first-class functions. Adapted from a Boise Code Camp talk.

Functional Programming Javascript

Introducing React-Scroll-To v2

Release notes and usage guide for react-scroll-to v2, a React component for scrolling to a point, a ref, or smoothly animating between them.

React Javascript

React: Controlling Rendering with Keys

The React key prop does more than silence warnings. Use it to force components to re-mount on demand, with a concrete example of why that helps.

React Javascript

Tips on Improving FabricJS Speed

Techniques that sped up FabricJS rendering of ~10k objects on a Canvas: disabling renderOnAddRemove, using enlivenObjects, and batching object loading.

Javascript FabricJS

React: Not Everything is State

Not every value in a React component belongs in state. Using class properties for IDs, timers, and non-rendering data keeps components simpler and faster.

React Javascript

Part Two: Using Typescript with Redux

Part two of using TypeScript with React: adding Redux. How to type actions, reducers, and connected components without fighting the compiler.

React Typescript Javascript

Generic Type Arguments in JSX Elements

How to use TypeScript 2.9's generic type arguments in JSX to build React components that extend their props while staying fully type-safe.

React Typescript Javascript

Part One: Using Typescript with React

Part one of a series on TypeScript with React. Build a typed counter, and cover props, state, and the setup pitfalls that trip people up.

React Typescript Javascript

Reusable Components: Factory Components

How to use the Factory Component pattern in React to split bloated 'mega components' with dozens of props into small, focused pieces.

React Javascript

Global Component Registration

Registering React components in a global store so modals and similar widgets can be triggered from anywhere in the app. Borrowed from Insomnia's source.

React Javascript

Encapsulating State with Functional Children

How to use functional children (what the community now calls render props) in React to share reusable stateful logic between components.

React Javascript

Tips on Creating Reusable Components

Tips for building reusable React components: keep them small, keep them composable, treat UI as a function of state.

React Javascript

Introduction to Higher Order Components

Higher Order Components (HOCs) in React, explained: what they are, why they work, and how to write one from scratch.

Javascript Frontend React

Injecting Dynamic Elements to Components

Letting consumers of a reusable React component swap the underlying HTML tag or child component, so you stop shipping ten near-duplicate versions.

Javascript Frontend React

Intro to FlightJS

Building a counter component with FlightJS, Twitter's component-based JavaScript framework, from scratch.

Javascript FlightJS