ๆƒฏๆ€ง่šๅˆ ้ซ˜ๆ•ˆ่ฟฝ่ธชๅ’Œ้˜…่ฏปไฝ ๆ„Ÿๅ…ด่ถฃ็š„ๅšๅฎขใ€ๆ–ฐ้—ปใ€็ง‘ๆŠ€่ต„่ฎฏ
้˜…่ฏปๅŽŸๆ–‡ ๅœจๆƒฏๆ€ง่šๅˆไธญๆ‰“ๅผ€

ๆŽจ่่ฎข้˜…ๆบ

Martin Fowler
Martin Fowler
L
LINUX DO - ๆœ€ๆ–ฐ่ฏ้ข˜
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
D
Darknet โ€“ Hacking Tools, Hacker News & Cyber Security
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy & Cybersecurity Law Blog
K
Kaspersky official blog
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
WordPressๅคงๅญฆ
WordPressๅคงๅญฆ
L
LINUX DO - ็ƒญ้—จ่ฏ้ข˜
OSCHINA ็คพๅŒบๆœ€ๆ–ฐๆ–ฐ้—ป
OSCHINA ็คพๅŒบๆœ€ๆ–ฐๆ–ฐ้—ป
ๅš
ๅšๅฎขๅ›ญ - Franky
V
Visual Studio Blog
O
OpenAI News
AI
AI
Hacker News: Ask HN
Hacker News: Ask HN
V2EX - ๆŠ€ๆœฏ
V2EX - ๆŠ€ๆœฏ
GbyAI
GbyAI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
S
Schneier on Security
Spread Privacy
Spread Privacy
Y
Y Combinator Blog
I
InfoQ
H
Hackread โ€“ Cybersecurity News, Data Breaches, AI and More
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
T
The Blog of Author Tim Ferriss
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
ๆœ‰่ตžๆŠ€ๆœฏๅ›ข้˜Ÿ
ๆœ‰่ตžๆŠ€ๆœฏๅ›ข้˜Ÿ
ไบบไบบ้ƒฝๆ˜ฏไบงๅ“็ป็†
ไบบไบบ้ƒฝๆ˜ฏไบงๅ“็ป็†
N
News and Events Feed by Topic
Project Zero
Project Zero
ๅฐไผ—่ฝฏไปถ
ๅฐไผ—่ฝฏไปถ
่ฎฉๅฐไบงๅ“็š„็‹ฌ็ซ‹ๅ˜็Žฐๆ›ด็ฎ€ๅ• - ezindie.com
่ฎฉๅฐไบงๅ“็š„็‹ฌ็ซ‹ๅ˜็Žฐๆ›ด็ฎ€ๅ• - ezindie.com
B
Blog
G
Google Developers Blog

Kent C. Dodds Blog

Implementing Hybrid Semantic + Lexical Search Simplifying Containers with Cloudflare Sandboxes Migrating to Workspaces and Nx Offloading FFmpeg with Cloudflare Building Semantic Search on my Content Helping YOU ask ME questions with AI How I used Cursor to Migrate Frameworks The Dow's Start on the Covenant Path 2025 in Review The next chapter: EpicAI.pro AI is taking your job How I increased my visibility Launching Epic Web 2023 in Review Stop Being a Junior RSC with Dan Abramov and Joe Savona Live Stream Fixing a Memory Leak in a Production Node.js App 2022 in Review My Car Accident I Migrated from a Postgres Cluster to Distributed SQLite with LiteFS I'm building EpicWeb.dev A review of my time at Remix Remix: The Yang to React's Yin How I help you build better websites Why I Love Remix The State Initializer Pattern How to React โš›๏ธ Get a catch block error message with TypeScript Building an awesome image loading experience How Remix makes CSS clashes predictable Introducing the new kentcdodds.com How I built a modern website in 2021 How to use React Context effectively Static vs Unit vs Integration vs E2E Testing for Frontend Apps The Testing Trophy and Testing Classifications Array reduce vs chaining vs for loop Don't Solve Problems, Eliminate Them Super Simple Start to Remix Super Simple Start to ESModules in Node.js JavaScript Pass By Value Function Parameters How to write a Constrained Identity Function (CIF) in TypeScript How to optimize your context value How to write a React Component in TypeScript TypeScript Function Syntaxes Listify a JavaScript Array Build vs Buy: Component Libraries edition Using fetch with TypeScript Wrapping React.useState with TypeScript Define function overload types with TypeScript 2020 in Review Business and Engineering alignment Hi, thanks for reaching out to me ๐Ÿ‘‹ useEffect vs useLayoutEffect Super simple start to Firebase functions Super simple start to Netlify functions Super Simple Start to css variables Favor Progress Over Pride in Open Source Testing Implementation Details How getting into Open Source has been awesome for me useState lazy initialization and function updates Use ternaries rather than && in JSX Application State Management with React Use react-error-boundary to handle errors in React JavaScript to Know for React How I structure Express apps What open source project should I contribute to? When I follow TDD AHA Programming ๐Ÿ’ก How I Record Educational Videos Should I write a test or fix a bug? Stop mocking fetch Intentional Career Building Improve test error messages of your abstractions Tracing user interactions with React Eliminate an entire category of bugs with a few simple tools Common mistakes with React Testing Library Super Simple Start to React Stop using client-side route redirects The State Reducer Pattern with React Hooks Function forms Replace axios with a simple custom fetch wrapper How to test custom React hooks React Production Performance Monitoring Should I useState or useReducer? Stop using isLoading booleans Make Your Test Fail Make your own DevTools An Argument for Automation Fix the "not wrapped in act(...)" warning Super Simple Start to ESModules in the Browser Implementing a simple state machine library in JavaScript 2010s Decade in Review Why users care about how you write code Why I avoid nesting closures Don't call a React function component Why your team needs TestingJavaScript.com Inversion of Control Understanding React's key prop How to Enable React Concurrent Mode Profile a React App for Performance
๐Ÿ’ฏ UPDATED: Advanced React Component Patterns โš›๏ธ
Kent C. Dodds ๐Ÿน @kentcdodds ยท 2018-06-01 ยท via Kent C. Dodds Blog

TL;DR

My highly popular course has been updated (completely re-recorded) and you can find it here:

๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

kcd.im/advanced-react

๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†

Here's the intro:

ALSO! You can follow along in codesandbox right here:

So what'sย new?

This course was originally published in December 2017. A few months after it was published, React 16.3.0 was released with some new APIs that really improved the usability of React for some of these patterns.

Compound Components + Context API =ย โค๏ธ

In particular, the Context API makes compound components much easier to make more flexible:

Make Compound React Components Flexible

I also have a few extra lessons to show you how you can validate that your Context Consumers are used properly:

Validate Compound Component Context Consumers

And here's another that shows you how to properly use the Context Provider to avoid unnecessary re-renders of your consumers:

Prevent Unnecessary Rerenders of Compound Components using React Context

Render Props

The render prop lessons have also been re-recorded, though no new React APIs were needed to make it remain an awesome pattern ๐Ÿ˜‰ People have told me that they really appreciate the way I teach render props:

Use Render Props with React

We also still have the prop collections and prop getters patterns because those are still very awesome.

State Reducers

We have a few lessons that feature a completely new pattern that wasn't in the original course that I implemented a while ago in downshift called the state reducer pattern:

Implement Component State Reducers

Improve the usability of Component State Reducers with state change types

Control Props

In the last course we had control props, but I've taken it further in this update to have more lessons about this subject and simplified the examples while making the implementation more real-world as well so you can focus on learning how to effectively use the pattern:

Make Controlled React Components with Control Props

Support Control Props for all state

Support a state change handler for all control props

Improve the usability of Control Props with state change types

The Providerย Pattern

Last time, we had quite a few lessons about the provider pattern. With the new Context API, I was able to show everything in a single lesson because the Context API is a built-in implementation of the provider pattern! In this lesson I give a demonstration of what Prop Drilling is and how the Provider Pattern can simplify things considerably making your React codebase much more manageable.

Implement the Provider Pattern with React Context

Higher Order Components

React 16.3.0 published a new API called React.forwardRef that simplified creating Higher Order Components (HOCs) in a big way. In this lesson you'll learn how to use that effectively. While everyone out there is all hyped up on render props (your's truly included), higher components do still have a place and value in the discussion of react patterns. This lesson is built on top of the provider pattern lesson so you can see how to turn a Context Consumer into a Higher Order Component.

Implement a Higher Order Component

Now go watchย it!

Thanks so much for all the support with all this content. This time around it's 20 minutes shorter than last time (despite having a few extra lessons for an entirely new pattern) because React keeps getting better at enabling these patterns. I hope you love it!

๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

kcd.im/advanced-react

๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†

Please share this blog post and the course link with your friends!

Kent C. Dodds ๐Ÿน avatar

Kent C. Dodds ๐Ÿน @kentcdodds

I just published โ€œ๐Ÿ’ฏ UPDATED: Advanced React Component Patterns โš›๏ธโ€ Just a moment...

Just a moment...

medium.com

5 253