Skip to content

React


JSX

  • JSX转换,编译时使用 Babel 实现。运行时,由JSX-runtime实现
ts
export function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
  return jsxDEVImpl(
    type,
    config,
    maybeKey,
    isStaticChildren,
    source,
    self,
    __DEV__ && enableOwnerStacks ? Error("react-stack-top-frame") : undefined,
    __DEV__ && enableOwnerStacks ? createTask(getTaskName(type)) : undefined,
  );
}
...