James K Nelson

Articles & Tutorials

An introduction to React's useEffect() hook (frontarm.com)
Aug 25, 2019
Learn about effects – a declarative approach to interacting with the world outside your app. With live demos, interactive exercises, and fractals.
My Intuition on When to Use Custom React Hooks (frontarm.com)
Mar 06, 2019
Custom hooks are like mixins: they're a great way to share stateful and side-effectful functionality between components.
From Hooks to... Render Props? (frontarm.com)
Feb 22, 2019
Even old-school class components allow you to compose component state. Hooks just make your life far, far simpler.
A <Router /> with Hooks and Suspense (frontarm.com)
Feb 18, 2019
Navi is a new kind of router for React. It lets you declaratively map URLs to content, even when that content is asynchronous.
useContext(): a React hook that's an obvious win (frontarm.com)
Feb 06, 2019
Hooks are a brand new API with a lot of hype. But don't let that fool you – useContext() is incredibly useful.
CSS-in-JS and Static Rendering (frontarm.com)
Feb 02, 2019
CSS-in-JS can be a huge win for maintainability. But for large statically rendered websites, plain CSS still has its place.
4 ways to pass children to React elements (frontarm.com)
Jan 28, 2019
Sure, you already know that you can pass children to React elements by nesting JSX tags. But what about the other 3 ways?
React Fragments in Practice – 4 real-world examples (frontarm.com)
Jan 23, 2019
Learn how to use React Fragments let to group React elements, without requiring unnecessary markup or confusing key props.
Using MDX with create-react-app 2 (frontarm.com)
Jan 16, 2019
Learn how to get the succinct syntax of Markdown, the power of JSX, and all with the simplicity of create-react-app 2.
Static vs. Server Rendering (frontarm.com)
Jan 15, 2019
Static rendering and server rendering both involve rendering HTML for each of your app's pages – but there's one major difference between them...
Navi: SEO & routing with vanilla create-react-app (frontarm.com)
Dec 12, 2018
Build big, fast, CDN-delivered websites with great SEO & SMO, and all with vanilla create-react-app.
Passing state to render props via context (frontarm.com)
Nov 02, 2018
Headless components are a great new way to separate presentation and control logic. But what if you don't want to pick and place all the render function's props manually?
How to conditionally set default props (frontarm.com)
Oct 22, 2018
The defaultProps object on React components doesn't have access to this.props. So how can I make default props depend on other props?
How to pass data to props.children (frontarm.com)
Oct 17, 2018
React makes it easy to pass children to reusable components. But what if those children need to receive data from the component that renders them?
Avoiding unnecessary renders with React context (frontarm.com)
Oct 12, 2018
Before you replace Redux's <Provider> component with React's new context API, there's a thing or two that you should know about performance.
When Context Replaces Redux (frontarm.com)
Oct 02, 2018
Since Redux was created in 2015, its <Provider> component has always used React's Context API. So how can Context replace Redux?
3 Anti-patterns for Conditional Rendering with React (frontarm.com)
Sep 21, 2018
You already know how to implement conditionally rendering with React: just use JavaScript! This gives you a huge amount of power... to shoot yourself in the foot.
Learn React’s fundamentals without the buzzwords (jamesknelson.com)
Aug 30, 2018
React comes with a boatload of buzzwords. Redux and GraphQL and Webpack and JSX and how am I supposed to get anything done when keeping up with the ecosystem is a full time job in itself?
CRUV: Structure React apps in 4 directories and 3 files (jamesknelson.com)
Aug 09, 2018
Where do your components go? Where should you put business logic? Where do higher order components fit in? And even if your structure feels right now, how do you know that it won’t feel wrong later?
Sensible React Forms, with Govern (jamesknelson.com)
Apr 02, 2018
Luckily, React forms don’t have to be awkward. In fact, they can be downright easy. And the trick is simple: you just need to understand that form state isn’t like other state.
Component-based state management for React (jamesknelson.com)
Apr 02, 2018
While React’s component system is great for creating view components, it can’t solve everything. And in particular, it can’t solve state.

Podcast Episodes

James K Nelson on React with the Buzzwords (reactpodcast.com)
Aug 22, 2019
This week on React Podcast we sit down with James K Nelson. We discuss what makes React hard to learn and how he's addressing that with his teaching platform frontarm.com.

Libraries

navi (frontarm.com)1506
v0.13.3
Jul 19, 2019
A batteries-included router for React.