Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-unforget

> 前端框架
Open source

Use React Compiler instead ⚠️ A compiler for automatic optimization of React apps

386 stars0 likes0 views
WebsiteGitHub

About

Use React Compiler instead ⚠️ A compiler for automatic optimization of React apps

[2023-06-02] Note ⚠ - React Unforget was an experimental project developed before the release of the React Compiler. As the React Compiler is now available, we recommend using it instead of React Unforget for your projects. For more information and to get started with the React Compiler, visit the official documentation: React Compiler


React Unforget

React Unforget is a compiler designed to enhance the performance of React applications through intelligent memoization and optimization. By analyzing and transforming React components and hooks, React Unforget aims to reduce unnecessary re-renders and optimize the execution flow, thus bridging the performance gap with more efficient frameworks like Svelte.

For demos and more information, visit the official website.

How It Works

The transformation process involves two main steps:

  1. Computing Dependency Graph: The initial step involves creating a segment from the root block statement and performing a dependency graph traversal to understand the interdependencies between various code segments.

  2. Transforming Segments: Based on the dependency graph, code segments are transformed to optimize their execution and reduce unnecessary computations.

Features

  • Intelligent component and hook memoization: Automatically identifies and memoizes React components and hooks, ensuring that only necessary re-renders occur. This leads to a more performant yet with more readable code.
  • Granular JSX element unwrapping: Unwraps JSX elements and memoizes each element and expression separately for more effective optimization. Eliminiating the need to use React.memo.
  • Memoization beyond early returns: React Unforget uniquely enables the memoization of values even after early returns in component functions, eliminating the need to restructure your code to comply with the Rules of Hooks. This ensures optimization without altering the logical flow of your components.

Comparison with React Compiler

React Compiler (Forget) is still under development and its release date remains uncertain. React Unforget offers an alternative approach to optimizing React applications, similar to how Preact serves as an alternative to React. It not only provides a fallback option but also pushes the boundaries of what's possible within the React ecosystem, encouraging innovation and diversity in optimization techniques.

License

React Unforget is open-source software licensed under the MIT license. Feel free to use, modify, and distribute it as per the license terms.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptbabelreactreact-forget

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架