Skip to content

Commit

Permalink
docs: better communicate macro usage restrictions (#2139)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Dec 27, 2024
1 parent a1da184 commit fe62470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/docs/tutorials/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ select(gender, {
});
```

:::caution
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.
:::

## See Also

- [Message Extraction Guide](/guides/message-extraction)
Expand Down
4 changes: 4 additions & 0 deletions website/docs/tutorials/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ export default function ImageWithCaption() {

:::

:::caution
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.
:::

## Review

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

0 comments on commit fe62470

Please sign in to comment.