DEV Community

Cover image for This Week In React #169: useMemo, 2 Reacts, Next.js, Remix, JS Rising Stars, Docusaurus, Astro, Fresnel, Mutative, JSX emails...
Sebastien Lorber
Sebastien Lorber

Posted on • Originally published at thisweekinreact.com

This Week In React #169: useMemo, 2 Reacts, Next.js, Remix, JS Rising Stars, Docusaurus, Astro, Fresnel, Mutative, JSX emails...

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!


💡 Subscribe to the official newsletter to receive an email every week!

banner


💸 Sponsor

Nlux ― A new new React / JS library to create conversational AI web apps

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 and useAdapter hook for easy integration.
  • Flexible LLM Adapters - ChatGPT and HuggingFace, 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

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.


The Two Reacts

The Two Reacts

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?



💸 Sponsor

CMS with Inline Visual editing for Next.js, Remix and Gatsby

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

Who's using Expo OSS in 2024

Who's using Expo OSS in 2024

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.



🔀 Other


🤭 Fun

alt

See ya! 👋

Top comments (0)