Skip to content

Commit fe62470

Browse files
docs: better communicate macro usage restrictions (#2139)
1 parent a1da184 commit fe62470

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

website/docs/tutorials/javascript.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ select(gender, {
8484
});
8585
```
8686

87+
:::caution
88+
All Core Macros cannot be used at the module level. They must be used within a component or function. See the [Macros](/ref/macro#using-macros) documentation for more information.
89+
:::
90+
8791
## See Also
8892

8993
- [Message Extraction Guide](/guides/message-extraction)

website/docs/tutorials/react.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ export default function ImageWithCaption() {
645645

646646
:::
647647

648+
:::caution
649+
All Core Macros cannot be used at the module level. They must be used within a component or function. See the [Macros](/ref/macro#using-macros) documentation for more information.
650+
:::
651+
648652
## Review
649653

650654
After all modifications, the final i18n-ready component looks like this:

0 commit comments

Comments
 (0)