🧡 This Week In React

πŸ‘‰ Shopify Hydrogen
πŸ‘‰ React-Router
πŸ‘‰ Storybook interactive stories
πŸ‘‰ State Initializer pattern
πŸ‘‰ React + TDD
πŸ‘‰ Next.js
πŸ‘‰ Expo modules
πŸ‘‰ Skia
πŸ‘‰ TypeScript
πŸ‘‰ Chrome/Lighthouse User Flow

... more in the newsletter

🧡 Details πŸ‘‡
🧡 Hydrogen by @ShopifyDevs

An opinionated React framework for Shopify E-commerce sites

Bets all-in on Server Components, streaming SSR
Oxygen: dedicated hosting infra to come (V8 isolates at Edge)

=> Highly dynamic content without perf compromise

hydrogen.shopify.dev
🧡 React-Router v6 by @mjackson & @ryanflorence

Best of React & Reach routers: code-splitting, TS support, route ranking, config object

New: subroutes relative to parent, <Outlet> comp...

API remains familiar

Extensive migration doc + compact package

remix.run/blog/react-rou…
🧡 @storybookjs Interactive stories (beta) by @winkerVSbecks

Sometimes, props are not good enough to set a stateful React component in the wanted UI state

Storybook introduces a "play()" method where you can use @TestingLib APIs to do the setup!

storybook.js.org/blog/interacti…
🧡 The State Initializer Pattern

@kentcdodds explains a reset callback has pros over resetting with a React key update:
- lighter, no unmount/remount
- smoother, can preserve animated state transitions

Trap to avoid: an initialValue prop might change

kentcdodds.com/blog/the-state…
🧡 Creating a React component with TDD

@mattibarzeev uses TDD baby steps cycle to test a React component rendering and interactions with TDD

No test of implementation details, using Testing Lib: test remains robust to refactors.

dev.to/mbarzeev/creat…
🧡 TypeScript Control flow analysis for destructured discriminated unions, PR merged by @ahejlsberg

Very useful for React: destructuring props, fetch hooks results...

No need to write unnatural JS just for TS, the following will now compile!

github.com/microsoft/Type…
🧡 File-based routing with React Router

@oedotme continues with Part 2

He adds Vite-based code-splitting to its homemade file-based routing system

Not so complicated to implement in user-land πŸ‘

omarelhawary.me/blog/file-base…
🧡 πŸŽ™οΈπŸŽ₯ Podcast with @swyx & @leeerob

Lots of interesting subjects!

Couldn't listen to it this week πŸ˜…

But definitely will, I'll comment next week!

🧡 @hdjirdeh explains that what the Aurora team at Google did for Next.js

Also, what's to come next.

Note: Aurora seems to also have worked on Shopify Hydrogen ;)

🧡 Embracing Expo Modules in your React Native Projects

@kudochien debunks the myth that Expo modules are only for full-featured Expo apps

It's not all-or-nothing:
- any React-Native app can easily use a single Expo module
- it remains lightweight

blog.expo.dev/embracing-expo…
🧡 TypeScript 4.5 RC

ES modules support for Node.js delayed

Some of my highlights:

devblogs.microsoft.com/typescript/ann…
🧡 Chrome & Lighthouse user flows

Chrome allows to record/replay full user flows
➑️ developer.chrome.com/docs/devtools/…

Lighthouse can measure lab perf for nav & user interactions
➑️ objectively measure the whole experience, not just initial page load!
➑️ web.dev/lighthouse-use…
🎬 THREAD END!

Follow @sebastienlorber for the next threads!

πŸ‘Œ Better insights and more content by email

βœ‰οΈ Subscribe now at ThisWeekInReact.com

----

❀️ Like this thread 🧡 ?

πŸ™ Please help me & Retweet the thread "head" below πŸ‘‡

Previous editions?

They are all published online at ThisWeekInReact.com

Read the previous Twitter thread here:

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Sebastien Lorber πŸ‡«πŸ‡· πŸ¦–

Sebastien Lorber πŸ‡«πŸ‡· πŸ¦– Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sebastienlorber

28 Sep
This week in React

πŸ‘‰ Chat with Swyx & Sunil
πŸ‘‰ Shopify Hydrogen
πŸ‘‰ MUI v5
πŸ‘‰ React antipatterns
πŸ‘‰ useIsMounted
πŸ‘‰ useReducer
πŸ‘‰ Expo OTA
πŸ‘‰ Skia Breakout
πŸ‘‰ Reanimated Layout anim
πŸ‘‰ Colorwaver
πŸ‘‰ Smart client vs Smart server
πŸ‘‰ Rome ➑️ Rust
πŸ‘‰ Partytown
...

🧡 Details πŸ‘‡
1/ 🎧 Podcast with @swyx & @threepointone about various React-related topics



Really interesting discussion, a lot of insights/opinions:
- state machines
- Gatsby 4 vs Next.js
- why swc is a better fit for Next.js

First time I read about Hydrogen & Bun
2/ 🎦 Hydrogen by @ShopifyDevs

πŸ™‰ Slipped under my radar

CEO @tobi says React is about to reach the sweet spot for e-commerce

WIP meta-framework for Shopify
Custom hooks/comps
All-in on React server-components
Using Vite
Deploy on Oxygen platform

shopify.dev/hydrogen
Read 19 tweets
21 Sep
This week in React

πŸ‘‰ React 18 updates
πŸ‘‰ Gatsby 4
πŸ‘‰ Context
πŸ‘‰ FileSystem routing
πŸ‘‰ Shadows
πŸ‘‰ React & RN history flashback
πŸ‘‰ Next.js & Vercel
πŸ‘‰ State Management
πŸ‘‰ Custom hooks readability
πŸ‘‰ React Native everywhere
πŸ‘‰ React Native windows
πŸ‘‰ Corepack
...

🧡 Details πŸ‘‡
1/ @dan_abramov shared a long React 18 update, mostly for course creators:

github.com/reactwg/react-…

Some APIs are stable. There's still a good amount of work left

We shouldn't extrapolate the Big Picture vision too much for now

React 18 is not only for FB scale apps
2/ @gatsbyjs 4 introduced by @schaudustin

v4.gatsbyjs.com/gatsby-4/

- SSR
- deferred static generation
- parallel query running

New exciting features, and should close the gap with Next.js in terms of feature parity.

I bet @netlify will support Gatsby SSR/DSG soon 🀣
Read 27 tweets
23 Aug
This week in React

πŸ‘‰ Scheduling Profiler
πŸ‘‰ Next.js 11.1
πŸ‘‰ Split components
πŸ‘‰ "context flag" anti-pattern virus
πŸ‘‰ Dynamic forms with visitor
πŸ‘‰ TS Unions with Destructuring
πŸ‘‰ React Native 0.65 + plans
πŸ‘‰ React Navigation 6.0
πŸ‘‰ Portals + document.body
...

🧡 Details πŸ‘‡
React has a new Scheduling Profiler, presented by @brian_d_vaughn

This should help understand better what React is working on, in a concurrent world with features such as Suspense, transitions, offscreen, lazy...

Pro-active & also hint suggestions

github.com/reactwg/react-…
Next.js 11.1 released by @vercel team

nextjs.org/blog/next-11-1

They keep improving DX and perf.
In particular, swc integration and transforms rewritten in Rust.

Experimental ES modules support (turned on by default in next Next 😏)

Next Image improvements
Read 15 tweets
14 Jun
This week in React

πŸ‘‰ React 18 links:
- Plan for React 18
- Working Group
- Intro
- Story
- Now what?
- With TS?
- TL.DR Video

πŸ‘‰ Redux Toolkit Query
πŸ‘‰ Don't overabstract comps
πŸ‘‰ React-Native 0.65 RC
πŸ‘‰ Reanimated 2.3 layout animations
πŸ‘‰ Astro
πŸ‘‰ Vue 3.1
πŸ‘‰ ..

🧡 Details πŸ‘‡
The @reactjs team published a new post

The Plan For React 18:
- first alpha published
- mention available features
- introducing the working group
- gradual adoption strategy
- stable release expected in a few months

reactjs.org/blog/2021/06/0…
The React 18 working group is a GitHub repo containing Read-only discussions (unless you are invited to contribute).

Already contains a lot of new useful information to process

github.com/reactwg/react-…
Read 16 tweets
17 May
This week in React

πŸ‘‰ Docusaurus 2 Beta
πŸ‘‰ Chose React over Vue
πŸ‘‰ (un)controlled inputs
πŸ‘‰ Eliminate problems
πŸ‘‰ Recoil 0.3
πŸ‘‰ Coinbase -> React Native
πŸ‘‰ Stripe-React-Native
πŸ‘‰ Hermes on iOS
πŸ‘‰ Babel drama
πŸ‘‰ TypeScript 4.3 RC
πŸ‘‰ TS 7 sources of unsoundness
...

🧡 Details πŸ‘‡
We released the @docusaurus v2 beta!
It's easier than ever to create a doc website!

v1 feature parity is here with i18n, and core features are stable enough!

docusaurus.io/blog/2021/05/1…

Check our best documentation websites here:
docusaurus.io/showcase?tags=…
Bill gives good reasons why he prefers React over Vue here:
- TS compatibility, JSX is just JavaScript
- Functional purity

javascript.plainenglish.io/why-i-finally-…
Read 17 tweets
3 May
This week in React

πŸ‘‰ Remix v1 beta
πŸ‘‰ Next.js 10.2
πŸ‘‰ Redux 4.1
πŸ‘‰ Babel 7.14
πŸ‘‰ Safari 14.1
πŸ‘‰ Suspense is killing me
πŸ‘‰ Key prop
πŸ‘‰ Advanced Framer Motion
πŸ‘‰ Design system: Stitches & Radix
πŸ‘‰ Airtable Flow ➑️ TS
πŸ‘‰ Inspx
πŸ‘‰ Expo + Next.js
πŸ‘‰ Mighty
...

🧡🧡🧡 Details πŸ‘‡πŸ‘‡πŸ‘‡
Remix v1 first beta!

The React meta-framework built by @mjackson & @ryanflorence launched as a 1h30 Youtube stream:

The @vercel team is working hard to improve the Next.js DX even more.

10.2 release improves startup time, hot reload, and many other things.

The Webpack 5 rollout has started for simpler Next.js sites and should also improve rebuild times significantly

nextjs.org/blog/next-10-2
Read 20 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(