Skip to content

Commit

Permalink
Add usage for Trans component with self-closing tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmet Atasoy committed Feb 11, 2019
1 parent 188f537 commit 229f34e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/typescript/examples.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ function MyComponent() {
);
}

// Component using the Trans component without children (Self-closing)
function MyComponentWithoutChildren() {
return (
<Trans i18nKey="description.part1" />
);
}

// page uses the hook
function Page() {
const { t, i18n } = useTranslation();
Expand Down

0 comments on commit 229f34e

Please sign in to comment.