ice icon indicating copy to clipboard operation
ice copied to clipboard

[RFC] Remove useEffect from the codebase for server bundling

Open ClarkXia opened this issue 1 year ago • 0 comments

Summary | 概述

No response

Motivation | 背景

When the bundle runs on the server side, useEffect is not executed. ICE can omit any useEffect code to reduce the bundle size.

Usage example | 使用示例

No response

Detailed design | 方案设计

Server React API optimization including useEffect, useLayoutEffect and useState.

Add an SWC plugin to implement this functionality, with special attention to the handling of the bindingScope Indent. This feature is optional, and it can be active by user config.

Additional context | 额外信息

No response

ClarkXia avatar Oct 25 '24 07:10 ClarkXia