File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,21 +441,9 @@ Benefits of using JSX:
441441
442442` Text.tgx ` function accepts a JSX element and returns an instance of ` Text.Tgx ` , which can then be used as a content of a message.
443443
444- <details >
445- <summary >How it works?</summary >
446-
447- JSX is just syntactic sugar transformed by the compiler.
448- Result of transformation depends on the JSX runtime.
449- ` effect-tg ` relies on JSX runtime from [ ` @grom.js/tgx ` ] ( https://github.com/grom-dev/tgx ) , which transforms JSX elements to ` TgxElement ` instances.
450- When ` Send.sendMessage ` encounters an instance of ` Text.Tgx ` , it converts inner ` TgxElement ` s to the parameters for a ` send* ` method.
451-
452- </details >
453-
454444<details >
455445<summary >How to enable?</summary >
456446
457- To enable JSX support:
458-
4594471 . Install ` @grom.js/tgx ` package:
460448
461449 ``` sh
@@ -475,6 +463,16 @@ To enable JSX support:
475463
476464</details >
477465
466+ <details >
467+ <summary >How it works?</summary >
468+
469+ JSX is just syntactic sugar transformed by the compiler.
470+ Result of transformation depends on the JSX runtime.
471+ ` effect-tg ` relies on JSX runtime from [ ` @grom.js/tgx ` ] ( https://github.com/grom-dev/tgx ) , which transforms JSX elements to ` TgxElement ` instances.
472+ When ` Send.sendMessage ` encounters an instance of ` Text.Tgx ` , it converts inner ` TgxElement ` s to the parameters for a ` send* ` method.
473+
474+ </details >
475+
478476** Example:** Composing reusable messages with JSX.
479477
480478``` tsx
You can’t perform that action at this time.
0 commit comments