Skip to content
Cory House

Cory House

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

Category Archives: React

React Server Components in 5 Minutes

Server rack

I’m excited about React Server Components. In this post, I will summarize the benefits and limitations in a few quick points.

For more details, check out the Facebook team’s announcement video.

The Big Idea

Render React components in one … Read on...

Posted byCory HouseJanuary 24, 2021January 24, 2021Posted inJavaScript, React

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

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