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

Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator

Friday, February 14, 2025

What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Defining Your Paranoia Level: Navigating Change Without the Overkill

Friday, February 14, 2025

We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy

5 ways AI can help with taxes 🪄

Friday, February 14, 2025

Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help

Recurring Automations + Secret Updates

Friday, February 14, 2025

Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

The First Provable AI-Proof Game: Introducing Butterfly Wings 4

Friday, February 14, 2025

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%

GCP Newsletter #437

Friday, February 14, 2025

Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers

Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰

Friday, February 14, 2025

Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from

The Great Social Media Diaspora & Tapestry is here

Friday, February 14, 2025

Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great

Daily Coding Problem: Problem #1689 [Medium]

Friday, February 14, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,

📧 Stop Conflating CQRS and MediatR

Friday, February 14, 2025

​ Stop Conflating CQRS and MediatR Read on: m​y website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your