React Digest - #383 How to Manage State in React

#383 – November 21, 2022 View in browser

React Digest

How to Manage State in React

React state management is a process for managing the data that React components need in order to render themselves. This data is typically stored in the component's state object. When the state object changes, the component will re-render itself.

Consider adopting TypeScript for your React app? (sponsor)

While there’s wide adoption of TypeScript, there are still a lot of teams that don’t use it but are interested in adopting it for their React projects. Read about what to watch for before you make the switch.

React Component with TypeScript

When using function components in React, we may want to type their props with TypeScript. Overall there are two ways of making a React component type safe with TypeScript, however, let's start by converting the following JavaScript React component to a TypeScript React component as leading example.

Building a real-time bidding system with Socket.io and React Native

Today we are going to build a mobile app with React Native and Socket.io - eBay style!

Reader question: useReducer or XState?

You can use useReducer to implement a state machine and clean up your ternary soup. It won't have the safety guarantees of XState or the built-in support for side effects (called actions in xstate), but it's going to be a state machine.

Why we ditched GraphQL for tRPC

We adopted GraphQL in Bison to give our apps end-to-end type checking, with type safety from the database all the way to the UI. It’s served us well, and has been the API layer for dozens of apps developed by Echobind.

Refactoring A Junior’s React Code - 43% Less Code With A Better Data Structure

As an (aspiring) Junior React developer it’s hard to understand if your code is any good and how you can improve it. It would be great to get a review from an experienced dev. But sharing your code takes guts. And the reviews you get in online communities are often shallow.

how did you like this issue?

newsletters

© 2022 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

#382 A love letter to React

Monday, November 14, 2022

#382 – November 14, 2022 View in browser React Digest A love letter to React It's hard to overstate the impact React has had since its release in 2013. For me, React came with a few revelations.

#381 Build responsive Figma-to-React components with almost no code

Sunday, November 6, 2022

#381 – November 07, 2022 View in browser React Digest Build responsive Figma-to-React components with almost no code Amplify Studio is excited to announce significant enhancements to responsive

React Digest #380: We Improved React Loading Times by 70% with Next.js

Sunday, October 30, 2022

And more news, tutorials and articles about React in this week's issue. #380 — October 31, 2022 View in browser React Digest Spread the word, build the community, share the knowledge with your

React Digest #379: Building a chat app with Socket.io and React Native 🤯

Sunday, October 23, 2022

And more news, tutorials and articles about React in this week's issue. #379 — October 24, 2022 View in browser React Digest Spread the word, build the community, share the knowledge with your

React Digest #378: RFC: First class support for promises and async/await

Sunday, October 16, 2022

And more news, tutorials and articles about React in this week's issue. #378 — October 17, 2022 View in browser React Digest Spread the word, build the community, share the knowledge with your

You Might Also Like

Is there more to your iPhone?

Monday, November 25, 2024

Have you ever wondered if there's more to your iPhone than meets the eye? Maybe you've been using it for years, but certain powerful features and settings remain hidden. That's why we'

🎉 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 ͏ ͏