Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/docs/guide/usage/transformer/jsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = transform("App.jsx", sourceCode, {
runtime: "automatic", // or "classic"
development: false, // or true
throwIfNamespace: true, // or false
pure: true, // or false, currently noop
pure: true, // or false
importSource: "react",
pragma: "React.createElement",
pragmaFrag: "React.Fragment",
Expand Down Expand Up @@ -46,7 +46,11 @@ By default, the development specific transforms are disabled. You can enable the

### XML Namespaced Tag Names

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.
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`.

### Pure Annotation

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`.

## Automatic Runtime Specific Options

Expand Down