Function swc_ecma_transforms_react::jsx

source ·
pub fn jsx<C>(
    cm: Lrc<SourceMap>,
    comments: Option<C>,
    options: Options,
    top_level_mark: Mark,
    unresolved_mark: Mark,
) -> impl Fold + VisitMut
where C: Comments,
Expand description

@babel/plugin-transform-react-jsx

Turn JSX into React function calls

top_level_mark should be Mark passed to [swc_ecma_transforms_base::resolver::resolver_with_mark].

§Parameters

§top_level_ctxt

This is used to reference React defined by the user.

e.g.

import React from 'react';