Hi everyone!
A week with various content, from interesting React articles to new tools leading to some healthy FOMO π
Parcel CSS reusing a Rust css parser initially created for Firefox, that's really cool!
I was also happy to notice thatΒ Node.js plainly supports Error Cause!
πΒ Support the newsletterΒ π:Β
- πΒ Recommend it to your friends: it really helps!
- πΈΒ Sponsorise This Week In React
- πΒ Write testimonials on Twitter
- π§΅Β Retweet the latest Twitter thread
React
Good advice on JSX conditionals
We like React because it's just JavaScript and we don't need to learn another templating language. But let's admin it's not always easy and there are some pitfalls to avoid π This article gives a great overview.
Surma (Google) introduces a lib to use a Service Worker to create a React reducer (possibly async). Communication is efficiant thanks to ImmerJS and transmitting patches usingΒ postMessage
. Browser support is good, only Firefox needs a polyfill. Now let's find a good use-case for this π€·ββοΈ, anyone?
An Inconsistent Truth: Next.js and Type Safety
Interesting thoughts on the current limits of end-2-end typing in Next.js, focusing onΒ getServerSideProps
Β and page props. There's either too much manual boilerplate (risk of error), or a type helperΒ InferGetServerSidePropsType
Β that might give surprisingly unsafe results. Evokes a TypeScript feature much-awaited by all frameworks: theΒ ability to type module exports. Presents other solutions like Blitz, Server Components orΒ tRPC. The last one looks quite interesting (see also theΒ zartΒ boilerplate using it).
New reactive store for structured data (in tables, like SQL or Normalizr), with a React integration package including hooks likeΒ useCell
Β for efficient, fine-grained subscriptions. Small in size, but quite featured: index, relationships, undo/redo...
Extras:
- How we migrated 541 components from Styled Components to Emotion with zero bugs: feedback from migrating the Storybook codebase from one CSS-in-JS lib to another, dogfooding their own visual regression tooling (Chromatic) as a safety net
- Reading Source Code - Redux: Alex studied the Redux codebase and uses this opportunity to discuss the legitimate usage of TypeScript overloads inΒ
createStore
- Performance Optimization for Three.js Web Animations: useful techniques to know to efficiently integrate and lazy-load heavy React components. In this case an optional Three.js background.
- How to write performant React code: rules, patterns, do's and don'ts: good advice and 4 rules to take away
- Gatsby 4.5: also trying to typeΒ
getServerData
Β π - π₯Β How to Contribute to Open Source (Next.js)Β with Lee Robinson
- Remix-GraphQL
- Next.js RFC: Change default JS/CSS output to target modern browsers
πΈ Sponsors
Stream: powerful Chat & Feeds for React & React-Native
Stream is the maker of enterprise-gradeΒ APIsΒ andΒ SDKsΒ that help product and engineering teams solve two common problems at scale:Β in-app chatΒ andΒ social activity feeds.
With Stream, developers can integrate any type of messaging or feed experience into their app in a fraction of the time it would take to build these features from scratch.Β Stream Chat makes it easy for developers to integrate rich, real-time messaging into their applications.
Stream provides robust client-side SDKs for popular frameworks such asΒ React,Β React-Native, Flutter, Android, Angular, Compose, Unreal and iOS. It also supportsΒ Expo managed workflow.
Unlock enterprise-grade features, functions, and UI componentsΒ completely freeΒ for your startup or side project with theΒ Maker Account.
React-Native
React-Native-Owl: Visual Regression Testing for React-Native
This new solution runs your React-Native screens natively, takes screenshots, and compare them to the previously stored screenshots inΒ ./owl
Β to generate a report. All this is well-integrated with Jest (like snapshots).
Very happy to see visual regression testing progress for React-Native: this is very useful and React-Native has been left behind a bit compared to web. See alsoΒ Storybook React-Native-WebΒ permitting to do similar things withΒ Chromatic, but requiring a web conversion.
Extras:
- React-Native 0.67 should be released this week (changelogΒ is available)
- Build Flavor / scheme for React Native: allows to install the same app multiple times on a device: useful to manage multiple envs.
- Trying to understand the internals of Reanimated 2: nice overview, many diagrams
- expo-auto-navigation-webpack: work in progress by Evan Bacon to enable file-system-based navigation in React-Native (previous demo). Now using Webpack instead of Metro.
- Expo Modules + JSI: Expo confirms the goal to simplify our life to create performant native modules in Swift or Kotlin, based on JSI. This should come first to iOS.
- Demo React-Native-Gesture-Handler buttons: demonstrates advantages over React-Native Touchables
- Drawing (with Skia) in React Native: creating a progress indicator
- React-Native-Skia drawing app demo: drawing with fingers on a canvas
- Who is going to Support your Next Mobile App Project? Hint: Not React Native or Flutter: where to get support for a RN app? π€·ββοΈ
- React Native Facebook Login: The Hard Way + The Expo Way
Partners
- Start React Native: learn everything about gestures and animations with William Candillon
- React-Native Weekly: stay up-to-date React-Native core updates
- TypeScript Weekly: the best TypeScript links every week, right in your inbox.
- ES.next News: learn about the latest in JavaScript and cross-platform tools
- Tailwind Weekly: all things Tailwind CSS, new issue every Saturday
- G2i: pre-vetted remote React & React-Native developers you can trust on contract or full-time basis
- Infinite Red: US React-Native experts making your idea a reality
- Software Mansion: the co-creators of React Native and the technological core of many tech companies
Other
A new parser, compiler, minifier un CSS written in Rust, reusingΒ rust-cssparserΒ from Firefox. Outperforms competitors on terms of speed and output size (even esbuild). Integrated in Parcel, but can also be used standalone, in Rust or JavaScript (Webpack?), and evenΒ Deno or web (WASM)
New Rust framework largely inspired by React (hooks, VDOM, RSX...), strongly typed, performant, cross-platform (web, mobile, desktop, SSR). Aiming to be easy to adopt for a React/TypeScript dev.
I looked a bit the cross-platform support and I'm not sure yet how it works. It says native performance but seems to be usingΒ TauriΒ on desktop and mobile, afaik using WebViews? π€
Extras:
- TypeScript Cheatsheets: 4 official cheatsheets: Type, Interface, Class and Control Flow Analysis
- π₯Β CSS Cascade layers: gives better control over specificity of CSS rules. This could have an interesting impact:Β not having to care anymore about CSS insertion order. See alsoΒ Cascade Layers Explainer.
- π§΅Β How can I optimize my frontend for the fastest page load times?
- Announcing The Astro Technology Company: raising 7m$
- Adding Vite to Your Existing Web App: useful to migrate from Webpack
- Make Beautiful Gradients: Josh Comeau explains how to design gradients and introduceΒ Gradient Generator
- State Of JavaScript Survey: survey is open
- What's New In DevTools (Chrome 98)
- Publishing and consuming ECMAScript modules via packages
- Accelerating Svelte's Development
- Safari 15 IndexedDB LeaksΒ +Β Exploiting IndexedDB API information leaks in Safari 15
- Discontinued Long Term Support for AngularJS
- How we reduced our nodejs monorepo build time by 70%
- The Cost of Logging in 2022
- The State of WebAssembly -- 2021 and 2022
- How we built a VS Code extension with Rust, WebAssembly, and TypeScript
Top comments (0)