π¨ #169: useMemo, 2 Reacts, Next.js, Remix, JS Rising Stars, Docusaurus, Astro, Fresnel, Mutative, JSX emails, Expo usage, React-Native releases, Reanimated, VisionCamera, TypeScript, Rspack, Biome...
Hi everyone!
This week we have an exciting sneak peek of the future of React and memoization, and a lot of Lee Robinson's related content π
Expo is going strong in the React-Native ecosystem and the app stores πͺ
JavaScript Rising Stars 2023 has been published. This year I had the opportunity to comment on the React section. shadcn/ui and Bun took the world by storm. Iβm also thankful for Theo recommending my newsletter in his related trend analysis video: welcome to all of you who signed up recently π
Paris 2024 is not only the Olympic Games: we are also back at the center of the React conf world! Since the end of React Europe, there has been a lack of great React conferences in Paris. Itβs finally fixed with 3 great upcoming confs π
-
π 22 March - React Paris - The crew behind React Brussels and BeJS is launching a new conference in Paris and a great line-up has just been announced today!
-
π 22-23 April - React Connection + React-Native Connection - Last yearβs half-day React-Native conference that I helped organize was a great success. So it returns this year as a 1-day + 1-day conference, making it more worth it to travel. CFP is open until 3 February.
Iβll try to attend both, and hope to meet some of you there!
π‘ Check this newsletter on Twitter - visual format π¨
As always, thanks for supporting us on your favorite platform:
- π¦ Bluesky
- βοΈ X / Twitter
- π LinkedIn
- π½ Reddit
Don't miss the next email!
πΈ Sponsorβ
Nlux β A new new React / JS library to create conversational AI web apps
NLUX (for Natural Language User Experience) is a new open-source React / Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM.
Key features π include:
- Build AI Chat Interfaces In Minutes - High quality conversational AI interfaces with just a few lines of code.
- React Components & Hooks -
<AiChat />
for UI anduseAdapter
hook for easy integration. - Flexible LLM Adapters -
ChatGPT
andHuggingFace
, and an API to Create Your Own Adapter for any LLM. - Customisable Chat Personas - Configure bot and user pictures, names, and descriptions for personalised interactions.
- Zero Dependencies - Lightweight codebase, with zero-dependencies except for LLM front-end libraries.
More info, examples and documentation on Nlux.ai
βοΈ Reactβ
The future of React.use and React.useMemo - a powerful alternative to context selectors
Colin explains how React context can cause performance problems, the lack of a context selector API, and how he optimized an appβs performances thanks to the userland use-context-selector implementation from Daishi Kato.
The most interesting part is a great summary of the recent Twitter discussions. Dan Abramov explained context selectors do not compos well. Andrew Clark shared the plan to extend useMemo()
and allow the usage of other hooks inside it. This would work with the use hook with any Usable types (currently context and promises, but maybe Observables and stores in the future?), but also third-party hooks! This would solve the fine-grained selection problem in a performant and composable way, and be compatible with the upcoming React Forget compiler.
Great writeup from Dan Abramov, giving good reasons for code to run locally (instant feedback), as well as remotely (close to the data source). He proposes a new React formula: UI = f(data, state)
, where f
represents all your whole React app, running in 2 distinct environments.
This ends with a great question, implicitly asking if you would invent React Server Components to solve this problem.
Is there some way we could split components between your computer and mine in a way that preserves whatβs great about React? Could we combine and nest components from two different environments? How would that work?
- πΈ From Dreamweaver to JSX: The Evolution of Visual Dev Tools for the Web
- π 2023 JavaScript Rising Stars: see my comment on the React section.
- π¦ Next.js can now run with HTTPS locally
- π Remix Docs - new Client Data guide
- π Common mistakes with the Next.js App Router and how to fix them: Lee Robinson is in touch with hundreds of Next.js devs and gathered the most common mistakes. Also available as a video. TIL that the redirect function returns a never type and throws a Next.js specific error, surprising design.
- π How I'm Writing CSS in 2024: Lee Robinson likes CSS in 2024. He describes constraints that make a great UX/DX, and the role of a build step, compiler, or streaming. He recommends CSS Modules, Tailwind CSS, or StyleX.
- π Increasingly miffed about the state of React releases: No stable release for 550d considered harmful.
- π Executing Dangerously Injected Scripts Inside React Components: Interesting technique to bypass security limitations and execute scripts injected through dangerouslySetInnerHTML, using Document Fragments.
- π 28 Advanced NextJS features everyone should know: List and comments on various lesser-known features the author did not encounter in any app he worked on.
- π Things I would change about React to increase DX: List React pain points I can agee with, and make rough propositions to fix them (not all of them are great nor possible IMHO).
- π Harmful complexity: using React for static content: Interesting opinion, but I hope to prove the author wrong and believe React is nice for static content, particularly with RSCs.
- π A new blog for 2024: Using moderns tools such as Catalyst, TWC, Contentlayer, Tailwind, Next.js
- π How to Set Up Soft Navigation Reporting in a React App: Shows usage of the Google web-vitals npm package in a CRA app.
- π Introducing Superglue: React β€οΈ Rails: βSuperglue makes React and Redux as productive as Hotwire, Turbo and Stimulusβ
- π How Lee Robinson created his Guestbook, and you can do it too
- π 2024 Predictions by JavaScript Frontend Framework Maintainers
- π¦ Fresnel 7.0 - React 18 support - SSR compatible approach for responsive layouts for React
- π¦ @tanstack/router-vite-plugin - Vite alternative to the router CLI
- π¦ Docusaurus 3.1 - built-in broken anchors detectors,
parseFrontMatter
hook - π¦ Astro 4.1 - Accessibility audit rules, client:visible rootMargin, custom cookie encoding
- π¦ Mutative 1.0 - Efficient immutable updates, 10x faster than Immer
- π¦ JSX email 1.7 - A fork of react-email that keeps being improved
- π¨ Palettify - Get an instant preview for your theme - supports shadcn/ui and soon MUI
- π Remix Resources - Community templates, stacks and libraries
- π₯ Jack Herrington - HTMX For React Developers in 10 Minutes
- π₯ Lee Robinson - React Server Components: the Good, the Bad, and the Ugly
- π₯ Remix Singles - "Trellix" - Cookies, Auth, and Drag & Drop: 15 short videos by the Remix team, building a Trello clone (see the demo app).
Don't miss the next email!
πΈ Sponsorβ
CMS with Inline Visual editing for Next.js, Remix and Gatsby
Set up a project in just 1 minute with the CLI and define your own Visual blocks as React components to convey your pixel-perfect corporate brand, using any CSS framework.
Content editors can easily use these blocks to compose pages visually, just like using a word processor, without compromising the design system.
React Bricks is enterprise-ready with Digital Assets Management, Advanced SEO, Collaboration, Scheduled Publishing, Multilanguage, Integrations with external data sources, Approval Workflow, Single Sign-On, Multiple environments, Backup and Change history.
Trusted by corporate clients such as The Weather Channel, Deel.com, La Banque Postale, leading eCommerce sites and over 8,500 users worldwide.
Get started today!
π± React-Nativeβ
Evan Bacon gathered an impressive list of 1,599 apps that are using Expo libraries (and therefore, React Native). The list includes household names like Pizza Hut, Burger King, Microsoft, Discord, Shopify, NFL, Walgreens, Amazon, CNN, and many more. Itβs not news to us that React Native is thriving, but itβs nevertheless encouraging to see the big role that it plays when you look at top apps in the App Store.
- πΈ Galaxies.dev - Master React Native & Save 25% on PRO with code GALAXIES24
- π Proposal: Hover style API for iPad / Apple Vision Pro The iPad supports hover effects for mouse/trackpad users, and this will also be useful for Appleβs upcoming Vision Pro, where navigation elements get highlighted when the user looks at them.
- π Introduction to Reanimated: A good introductory article to learn about the concepts behind one of the most popular animation libraries for RN: shared values, reanimated style, animated view.
- π¦ React-Native v0.73.2 + v0.72.9 + v0.71.15: new releases fix the "Error installing boost Verification checksumβ iOS build errors, among other things.
- π¦ react-native-vision-camera 3.7.0: Now includes an Expo config plugin to easily enable the fully native QR/Barcode scanner.
- π₯ Theo - Moving off React Native: Clickbait, but informative. This is about moving from βvanillaβ React-Native to Expo.
- π₯ Szymon Rybczak - Bringing React Server Components to React Native
- π₯ Simon Grimm - THE React Native Tech Stack for 2024
π Otherβ
- π TypeScript 5.4 Iteration Plan -
NoInfer<T>
, throw expressions... - π Daniel Rosenwasser on TypeScript and Whatβs Ahead in 2024
- π Weird things engineers believe about Web development
- π The Website vs. Web App Dichotomy Doesn't Exist
- π The Popular Vote of Interop 2024
- π¦ Biome 1.5 - 97% Prettier compat + 2024 Roadmap
- π¦ Node 20.11 - improves test_runner, import.meta, perfβ¦
- π¦ Rspact 0.5 - Module Federation
π€ Funβ
See ya! π
Don't miss the next email!