<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/kentcdodds/best-of/2021" -->

---
title: Best Kent C. Dodds posts of 2021 | daily.dev
description: The most upvoted Kent C. Dodds posts of 2021, curated by the daily.dev community.
canonical: https://daily.dev/sources/kentcdodds/best-of/2021
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/kentcdodds/best-of/2021
og:type: website
og:site_name: daily.dev
og:title: Best Kent C. Dodds posts of 2021 | daily.dev
og:description: The most upvoted Kent C. Dodds posts of 2021, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of Kent C. Dodds — 2021

1. 1  
[](/posts/why-i-love-remix-rfovwif0q "Why I Love Remix")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
7m read time • Nov 13, 2021  
### Why I Love Remix  
Remix enables me to build amazing user experiences and still be happy with the code I had to write to get there. kentcdodds.com is completely custom built by me using Remix. After writing tens of thousands of lines of code using this framework, I have developed a great appreciation for what this framework can do for me.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/88bdb0721785e80f71e314f008e1c69b)  
53  
4
2. 2  
[](/posts/javascript-pass-by-value-function-parameters-uvtezwuw2 "JavaScript Pass By Value Function Parameters")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
4m read time • Apr 03, 2021  
### JavaScript Pass By Value Function Parameters  
In JavaScript, when you call a function with arguments, the arguments you're passing are passed by value, not by reference. When a new function is created, it looks around for all the variables it has access to and "closes over" them to form a "closure" This means that so long as this logger function exists, it will have access to the variables in its parent's function.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/a8ddf1fd7b803e1cb073abd2fd72fb34)  
21  
3
3. 3  
[](/posts/how-to-use-react-context-effectively-i1lmcnt-g "How to use React Context effectively")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
8m read time • Mar 08, 2021  
### How to use React Context effectively  
In Application State Management with React, I talk about how using a mix of local state and React Context can help you manage state well in any React application. I want to show you how you can create React context consumers effectively so you avoid some problems and improve the developer experience and maintainability.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/90532e02edd68fd907a8183def7441ac)  
18  
4
4. 4  
[](/posts/how-to-write-a-react-component-in-typescript-xwqt2fqjp "How to write a React Component in TypeScript")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
6m read time • Mar 04, 2021  
### How to write a React Component in TypeScript  
A common method to typing a React component is to use one of the generics that are built-into @types/react (I mean, it's built-in right? So what could go wrong?). Interestingly, you cannot type a function declaration this way, so we'll have to use a function expression. For functions, you need to consider the types coming in and the types going out.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/2b06efbf67c3bd73da049dc109d0ed98)  
18  
1
5. 5  
[](/posts/listify-a-javascript-array---px7jysb "Listify a JavaScript Array")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
4m read time • Feb 19, 2021  
### Listify a JavaScript Array  
Intl.List Format is a way to display a list of items to a user. Because it's coming from the Intl standard, a TON of locales are supported, so you can get internationalization for "free" There's also a lesser-known localeMatcher option which can be configured to either 'lookup' or 'best fit'

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/17a62a929d19685cf6094827a5485de5)  
17  
2
6. 6  
[](/posts/wrapping-react-usestate-with-typescript-pk0ya3awt "Wrapping React.useState with TypeScript")  
[![Kent C. Dodds's profile](https://avatars.githubusercontent.com/u/1500684?v=4&s=64)](https://daily.dev/kentcdodds)  
[![kentcdodds's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35263ab61358421e97d1e5a66fb8eada)](/sources/[source]/best-of/[year])  
4m read time • Jan 20, 2021  
### Wrapping React.useState with TypeScript  
I made a useDarkMode hook that looks like this. It powers the "dark mode" support for all the Epic React workshop apps (for example React Fundamentals) I want to call out a few things about the hook itself that made things work well from a TypeScript perspective. Let's clear out all the extra stuff and just look at the important bits.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/5b6971c64f87bbf862a967d8aa4183af)  
17  
2

[See all Kent C. Dodds archives](/sources/kentcdodds/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/kentcdodds/best-of/2021#page","url":"https://daily.dev/sources/kentcdodds/best-of/2021","name":"Best Kent C. Dodds Posts of 2021","description":"The most upvoted Kent C. Dodds posts of 2021, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/kentcdodds/best-of/2021#items","numberOfItems":6,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/why-i-love-remix-rfovwif0q","name":"Why I Love Remix"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/javascript-pass-by-value-function-parameters-uvtezwuw2","name":"JavaScript Pass By Value Function Parameters"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/how-to-use-react-context-effectively-i1lmcnt-g","name":"How to use React Context effectively"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/how-to-write-a-react-component-in-typescript-xwqt2fqjp","name":"How to write a React Component in TypeScript"},{"@type":"ListItem","position":5,"url":"https://daily.dev/posts/listify-a-javascript-array---px7jysb","name":"Listify a JavaScript Array"},{"@type":"ListItem","position":6,"url":"https://daily.dev/posts/wrapping-react-usestate-with-typescript-pk0ya3awt","name":"Wrapping React.useState with TypeScript"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"Kent C. Dodds","item":"https://daily.dev/sources/kentcdodds"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/kentcdodds/best-of"},{"@type":"ListItem","position":5,"name":"2021"}]}]}
```

