Skip to content

Commit efbf64e

Browse files
committed
docs: add react compiler note in docs
1 parent 11cc165 commit efbf64e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/docs/tutorial/widget-design.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ We can also use conditions, for/map, standard jsx. They cannot be async.
2626

2727
:::
2828

29+
:::danger React Compiler
30+
31+
If React Compiler is enabled, it automatically tries to memoize the widget component by adding hook calls. To avoid this, add `'use no memo';` at the top of the file where the widget is defined.
32+
33+
:::
34+
2935
We'll start with a Basic widget that says "Hello".
3036

3137
```jsx title="HelloWidget.tsx"
38+
'use no memo';
3239
import React from 'react';
3340
import { FlexWidget, TextWidget } from 'react-native-android-widget';
3441

0 commit comments

Comments
 (0)