#303 — August 31, 2022 |
Understanding Josh W. Comeau |
Why React Contexts Are Great (and Why We Didn't Use Them) — Something can be good, but also not a great fit for every project. Allen explains where his team ran into problems with Allen Janyska |
Get Started with Stream's Free Maker Account — Integrate activity feeds & chat messaging with help from Stream’s APIs/SDKs, including React. Stream sponsor |
React Error Boundaries: A Guide — Not properly catching errors thrown by third-party libraries or React hooks can have them end up reaching the top-level of the main execution thread, resulting in the dreaded “white screen” scenario. The official docs on error boundaries also remain useful. |
QUICK BITS:
|
|
When to Use useLayoutEffect Instead of useEffect — Do you have an annoying flicker in your UI? It may be you’re using the wrong one of these two hooks: it’s all about whether the hook fires before or after the browser paints. Jakub Kozak |
Instant Performance Upgrade: From FlatList to FlashList — Shopify’s more efficient FlashList is a simple swap-out for React Native’s FlatList and has the potential to make your list-intensive app really sparkle. Marek Fořt (Shopify Mobile Engineering) |
▶ How to Get Started with React and MUI — A 17-minute walkthrough of creating a basic app with MUI providing the components. Tek E |
Using React Router for Modularization — A brief guide to nested routes.
|
Ten React Traps To Avoid
|
🛠 Code and Tools |
Loading Disco: An Alternative to the Loading Spinner — Neat demo, though more subtle and less disco-y than I was expecting (perhaps to your relief) :-) Joe has used a neat technique and he invites you to “copy, remix and improve to your heart’s content.” GitHub repo. Joe Bell |
Create Rust App: Set Up a Modern Rust + React Web App in One Command — A CRA-esque experience if you’d prefer to build your app’s backend in Rust. It uses Vite and has just added SQLite support. Haris Khan et al. |
Work with APIs? Get Better API Observability in Minutes New Relic sponsor |
ReacType 13.0: The React Prototyping Tool — ReacType is an Electron app for prototyping React apps with a drag-and-drop canvas, preview rendering, and a tree graph to visualize app structure. v13 overhauls how state is managed. Darin Ngau |
React-Uploady 1.1: File Upload Components and Hooks — Aims to be simple but customizable. You get a file upload button, a preview, a zone for drag and drop uploads, and more. The docs are good and show off an example. Yoav Niran |
Sandpack: Component Toolkit for Creating Your Own Live Running Code Editing Experience — Created by the folks at CodeSandbox, so they know what they’re talking about. It has a really neat landing page, BTW. CodeSandbox |
Zhithead: A React and Framer Motion-Based Clone of a Ruder-Named Card Game — You can play the actual game here. I’m not familiar with the original game myself, but it’s a slick experience. Oktay |
⚡️ THE RAPID RELEASES ROUND React Native Gesture Handler 2.6 – Exposes platform native touch APIs. |