Skip to content

Commit d1d6fa8

Browse files
authored
fix(transformer): correct jsx.pure option description (#606)
1 parent c3e87fb commit d1d6fa8

File tree

1 file changed

+6
-2
lines changed
  • src/docs/guide/usage/transformer

1 file changed

+6
-2
lines changed

src/docs/guide/usage/transformer/jsx.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const result = transform("App.jsx", sourceCode, {
1212
runtime: "automatic", // or "classic"
1313
development: false, // or true
1414
throwIfNamespace: true, // or false
15-
pure: true, // or false, currently noop
15+
pure: true, // or false
1616
importSource: "react",
1717
pragma: "React.createElement",
1818
pragmaFrag: "React.Fragment",
@@ -46,7 +46,11 @@ By default, the development specific transforms are disabled. You can enable the
4646

4747
### XML Namespaced Tag Names
4848

49-
By default, an error is thrown if the XML namespaced tag names (e.g. `<foo:bar baz:qux="foobar" />`) are used. Though the JSX spec allows this, it is disabled by default since React's JSX does not currently support them.
49+
By default, an error is thrown if the XML namespaced tag names (e.g. `<foo:bar baz:qux="foobar" />`) are used. Though the JSX spec allows this, it is disallowed by default since React's JSX does not currently support them. You can allow them by setting `jsx.throwIfNamespace` option to `false`.
50+
51+
### Pure Annotation
52+
53+
By default, JSX elements are annotated with pure annotations. Pure annotations are annotation comments that marks expressions that can be safely removed if their return values are not used. But this may not be desired if the JSX elements should be kept. You can disable this by setting `jsx.pure` option to `false`.
5054

5155
## Automatic Runtime Specific Options
5256

0 commit comments

Comments
 (0)