React Digest - A cure for useState hell

#389 – January 16, 2023 View in browser

React Digest

A Cure for useState Hell

useReducer is an often forgotten, but extremely powerful, hook in React. It can replace many cases you might be using useState, with a number of advantages and very little overhead.

Build internal tools 10x faster using pre-built React components (sponsor)

Visually design apps that interface with any database or API. Switch to code nearly anywhere to customize how your apps look and work. With Retool, you ship more apps and move your business forward—all in less time. Thousands of teams at companies like Amazon, DoorDash and NBC collaborate around custom-built Retool apps to solve internal workflows. And now teams of up to 5 can build unlimited Retool apps for free.

Writing Custom Hooks with React

If you've done any React development, you've probably heard of "hooks" in components. Hooks enable you to reuse logic across your project's components. Hooks help minimize repetition of code, and also make your project's easier to maintain. React has a few "built in" hooks, but also allows you to build your own.

How We Rebuilt React DevTools with Replay Routines

A deep dive into using time-travel debugging superpowers to analyze recordings and extract React DevTools data.

Advanced Unit Testing in React with Jest: Hooks and Promises

Unit testing is essential in every codebase, and React is no exception. However, as the code becomes more complex, patterns and challenges are faced that go beyond the conventional cases. I have found that creating these specific unit tests allowed me to get a better understanding of how React works under the hood.

Data Binding in React

As developers, we don't like working with forms, but they're a critical part of most web applications! In this tutorial, you'll learn exactly how to wire up all of the different form controls in React. Never forget how to data-bind a checkbox or radio button again!

Function Composition in Large React Applications: Best Practices and Real-World Examples

Function composition is a powerful technique for building complex functionality by combining simple, reusable functions. In the context of React, function composition can be used to create more sophisticated and reusable components, improving the organization and structure of code in larger applications.

Little React Things: React applications are functions

Little React Things is a series of short, React-focused posts where I share some things I've learned over the past few years of developing with React. I hope you find them helpful. These posts might be most helpful for those who have at least a little experience with React already.

how did you like this issue?

Amazing · Great · Okay · Meh · Bad

newsletters

© 2023 Bonobo Press

Would you like to advertise with us? Check out our latest media kit for more information.
If you no longer wish to receive these emails, click to unsubscribe.

Older messages

How to debounce and throttle in React without losing your mind

Sunday, January 8, 2023

What is debounce and throttle, how to use them in React properly. #388 – January 09, 2023 View in browser React Digest And we are back! Hopefully, y'all had a lovely break and are ready for some

#387 Avoid These Common Pitfalls Of React useState

Sunday, December 18, 2022

#387 – December 19, 2022 View in browser React Digest Avoid These Common Pitfalls Of React useState useState is the easiest and most common React hook. But so are some of its problems. Become aware of

#386 Inside React Query

Sunday, December 11, 2022

#386 – December 12, 2022 View in browser React Digest Inside React Query I've been asked a lot lately how React Query works internally. How does it know when to re-render? How does it de-duplicate

#385 Is React going anywhere?

Sunday, December 4, 2022

#385 – December 05, 2022 View in browser React Digest Is React going anywhere? Earlier this year I had an interesting conversation with a CTO of a price comparison website (e-commerce) and he mentioned

#384 Data Structures In Frontend JavaScript In The Real World

Sunday, November 27, 2022

#384 – November 28, 2022 View in browser React Digest Data Structures In Frontend JavaScript In The Real World Data structures can be intimidating. Especially for the self-taught folks among us. If you

You Might Also Like

🎉 Black Friday Early Access: 50% OFF

Monday, November 25, 2024

Black Friday discount is now live! Do you want to master Clean Architecture? Only this week, access the 50% Black Friday discount. ​ Here's what's inside: 7+ hours of lessons .NET Aspire coming

Open Pull Request #59

Monday, November 25, 2024

LightRAG, anything-llm, llm, transformers.js and an Intro to monads for software devs ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Last chance to register: SecOps made smarter

Monday, November 25, 2024

Don't miss this opportunity to learn how gen AI can transform your security workflowsㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect

SRE Weekly Issue #452

Monday, November 25, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: Practice Makes Prepared: Why Every Minor System Hiccup Is Your Team's Secret Training Ground. https://firehydrant.com/blog/the-hidden-

Corporate Casserole 🥘

Monday, November 25, 2024

How marketing and lobbying inspired Thanksgiving traditions. Here's a version for your browser. Hunting for the end of the long tail • November 24, 2024 Hey all, Ernie here with a classic

WP Weekly 221 - Bluesky - WP Assets on CDN, Limit Font Subsets, ACF Pro Now

Monday, November 25, 2024

Read on Website WP Weekly 221 / Bluesky Have you joined Bluesky, like many other WordPress users, a new place for an online social presence? Also in this issue: CrawlWP, Asset Management Framework,

🤳🏻 We Need More High-End Small Phones — Linux Terminal Setup Tips

Sunday, November 24, 2024

Also: Why I Switched From Google Maps to Apple Maps, and More! How-To Geek Logo November 24, 2024 Did You Know Medieval moats didn't just protect castles from invaders approaching over land, but

JSK Daily for Nov 24, 2024

Sunday, November 24, 2024

JSK Daily for Nov 24, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JavaScript Certification Black Friday Offer – Up to 54% Off! Certificates.dev, the trusted

OpenAI's turbulent early years - Sync #494

Sunday, November 24, 2024

Plus: Anthropic and xAI raise billions of dollars; can a fluffy robot replace a living pet; Chinese reasoning model DeepSeek R1; robot-dog runs full marathon; a $12000 surgery to change eye colour ͏ ͏

Daily Coding Problem: Problem #1618 [Easy]

Sunday, November 24, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Zillow. Let's define a "sevenish" number to be one which is either a power