Skip to content
Cory House

Cory House

  • Blog
  • Courses
  • Training
  • Presentations
  • Appearances
  • About

6 Signs a Dev Team is Out of Control

“We don’t have time to write tests.”
“We don’t have time for code reviews.”
“We don’t have time to set up a CI server.”
“We don’t have time to automate deploys.”
“We don’t have time to make it accessible.”
“We … Read on...

Posted byCory HouseNovember 11, 2020November 17, 2020Posted inClean Code, Methodology, Source Control

Formik vs Plain React for Forms – Worth it?

I typically use plain React for forms. But I just converted a React form to use Formik.

Results (sizes minified):

  • Plain React: 130 lines of code, 46K
  • Formik: 105 lines of code, 58K
  • Formik + Yup (validation): 104
… Read on...
Posted byCory HouseAugust 19, 2020August 22, 2020Posted inJavaScript, ReactTags: React

Four Reasons React Renders (and three ways to stop it)

Paint brushes

There are four events that cause a React component to render:

  1. State change
  2. Prop change
  3. Parent render
  4. Context change

When state changes, you can skip the render via:

  1. shouldComponentUpdate
  2. React.memo

When props change or a parent renders, you can skip … Read on...

Posted byCory HouseJuly 16, 2020July 16, 2020Posted inReactTags: JavaScript, React

Four Ways to Fetch Data in React

Fetch data from REST APIs in React

React is a focused component library. So it has no opinion on how to request remote data. If you’re requesting and sending data to web APIs via HTTP, here are four options to consider.

  1. Inline
  2. Centralized
  3. Custom Hook
  4. react-query/swr

Let’s … Read on...

Posted byCory HouseJuly 6, 2020July 15, 2020Posted inJavaScript, React3 Comments on Four Ways to Fetch Data in React

On Admiring Simplicity

Plant on white background

A poorly-designed solution may seem impressive. Why? Because it’s complex and unapproachable. So it looks like it was hard to build.

A well-designed solution may seem unimpressive. Why? Because it’s simple, and approachable. So it looks like it was easy … Read on...

Posted byCory HouseJuly 4, 2020July 5, 2020Posted inClean CodeTags: Architecture, Clean Code

30 Ways to Handle React State

While preparing my upcoming Pluralsight course “Managing React State”, I found a surprising number of React state management options.

This slide from the upcoming course summarizes eight ways to handle state in React apps:

Throughout the course, I build a … Read on...

Posted byCory HouseJune 19, 2020July 5, 2020Posted inJavaScriptTags: JavaScript, React

Yep, JavaScript Moves Fast. Build Your Component Library Anyway.

Car component pieces

Here’s a question I’ve heard a few times recently:

“What if we create a component library in React/Vue/Angular/whatever and a new component technology replaces it?”

That’s not a question of if. It’s a question of when. These technologies have become … Read on...

Posted byCory HouseApril 6, 2018May 1, 2018Posted inJavaScript, UI, Web ComponentsTags: Angular, components, JavaScript, React

Environment Settings in JavaScript Apps

8 ways to handle environment-specific app settings

Airplane controls

Today many web apps are built using React, Angular, Vue, Ember, etc. These modern client-side rendered apps often call web APIs that are hosted on separate servers. This creates a problem: how do … Read on...

Posted byCory HouseMarch 1, 2018May 1, 2018Posted inJavaScript, UI

Designing Reusable React Components

What Legos Can Teach Us About Reuse in React Apps

Star Wars Lego Painter

React is a component library. So React makes it easy to break your UI down into composable pieces. The question is, how granular should the pieces be?

Let’s consider a … Read on...

Posted byCory HouseDecember 1, 2017May 1, 2018Posted inJavaScript, UITags: components, JavaScript, React

React Pattern: Centralized PropTypes

Avoid repeating yourself by centralizing PropTypes

Grand Central Station, New York, NY

There are three popular ways to handle types in React: PropTypes, TypeScript and Flow. This post is about PropTypes, which are currently the most popular.

Since PropTypes provide type warnings at runtime, it’s helpful … Read on...

Posted byCory HouseNovember 14, 2017May 1, 2018Posted inJavaScript, UncategorizedTags: JavaScript, React

Posts navigation

1 2 3 … 8 Older posts

About Cory

Cory HouseCory House is a React and JavaScript specialist. Cory is principal consultant at reactjsconsulting.com. I'm a Pluralsight author, a Microsoft MVP, and an international speaker. I believe in clean code, test-driven development, and responsive web UIs. I'm a retired wedding singer, lousy golfer, and lover of fine automobiles.

Pluralsight Author Page
My Pluralsight Courses

Cory House, © 2010 - 2020 Bitnative LLC