From 40e2617743e0e3012d7ce72f583ae6c5018bd7fb Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 6 Jun 2024 10:41:30 +0800 Subject: [PATCH] add a note about react compiler --- src/guide/extras/composition-api-faq.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/guide/extras/composition-api-faq.md b/src/guide/extras/composition-api-faq.md index f1cbf1cb..e715cefc 100644 --- a/src/guide/extras/composition-api-faq.md +++ b/src/guide/extras/composition-api-faq.md @@ -146,6 +146,8 @@ React Hooks are invoked repeatedly every time a component updates. This creates - The stale closure problem, combined with Concurrent features, makes it difficult to reason about when a piece of hooks code is run, and makes working with mutable state that should persist across renders (via `useRef`) cumbersome. +> Note: some of the above issues that are related to memoization can be resolved by the upcoming [React Compiler](https://react.dev/learn/react-compiler). + In comparison, Vue Composition API: - Invokes `setup()` or `