Data Fetching with React Server Components

Just announced by the React Team are Server Components: React Server Components are still in research and development. We are sharing this work in the spirit of transparency and to get initial feedback from the React community. With Server Side Rendering the rendering of your app to HTML happens up front, gets sent to the …

How to useRef to Fix React Performance Issues

Sidney Alcantara who works on Firetable, a product which features a data grid and an adjacent side drawer. When clicking a cell in the table, the side drawer opens with info about the current cell. Initially they lifted up the state, but that caused performance issues: The problem was whenever the user selected a cell …

10 ways to deploy a React app for free

If you’re looking for an intro on how to deploy your React app to Vercel, Firebase, Netlify, GitHub Pages, Heroku, etc. this page has got you covered. Comes with easy to follow instructions. 10 ways to deploy a React app for free → Related: Here’s my post on how to deploy your first site onto …

The several ways to import React

With the release of React 17 we also had to change the way we import React: To clarify: ✅ import { useState } from 'react'✅ import * as React from 'react'🟡 import React from 'react' The third one is called "default import" and in the long term (maybe in 19 or 20) we will stop …

React v17.0: A “Stepping Stone” Release

No new features, but a lot of changes, paving the way for future releases. The React 17 release is unusual because it doesn’t add any new developer-facing features. Instead, this release is primarily focused on making it easier to upgrade React itself. We’re actively working on the new React features, but they’re not a part …

The Opinionated Guide to React

Sara Vieira (@NikkitaFTW) published her book “The Opinionated Guide to React”. It’s 190 pages of React Recipes and Code Examples. This book is my personal map of the tips, power-ups and not-so-obvious solutions to common questions and problems that I’ve come across during 4 years of React development. I have been finding some of the …

React Refresh Webpack Plugin

If you’re using React Hot Loader, it’s time to start looking at React Refresh Webpack Plugin, an EXPERIMENTAL Webpack plugin to enable “Fast Refresh” (which you might know from React Native) for React components. It’s also to be included with Create React App version 4.0 (now in alpha). Installation per NPM/Yarn: npm install -D @pmmmwh/react-refresh-webpack-plugin …

React Spectrum – A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.

By Adobe: React Spectrum includes three libraries: React Spectrum — A React implementation of Spectrum, Adobe’s design system. React Aria — A library of React Hooks that provides accessible UI primitives for your design system. React Stately — A library of React Hooks that provides cross-platform state management and core logic for your design system. …

How Records & Tuples will improve React

Covered here before are Records and Tuples, two Immutable Datastructures most likely coming to JavaScript. Sebastien Lorber takes a look at how these will improve React. A whole category of React bugs are related to unstable object identities: Performance: can trigger re-renders that could be avoided Behavior: can trigger useless effect re-executions, and lead to …

useQueryParams – A React Hook for managing state in URL query parameters

Once you’ve set up a QueryParamProvider high up your component tree, you can start using useQueryParam to get (and set) querystring parameters import * as React from 'react'; import { useQueryParam, NumberParam, StringParam } from 'use-query-params'; const UseQueryParamExample = () => { // something like: ?x=123&foo=bar in the URL const [num, setNum] = useQueryParam('x', NumberParam); …