Skip to content

Commit

Permalink
feat: add v1 compatibility functions _jsx*
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens committed Aug 28, 2024
1 parent 671938f commit b1cb34c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/qwik/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export {
jsxs,
h,
h as createElement,
_jsxC,
_jsxS,
_jsxQ,
} from './render/jsx/jsx-runtime';
export type * from './render/jsx/types/jsx-generated';
export type {
Expand Down
15 changes: 15 additions & 0 deletions packages/qwik/src/core/render/jsx/jsx-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ export const _jsxSplit = <T extends string | FunctionComponent<any>>(
return _jsxSorted(type, sortedProps, constProps, children, flags, key, dev);
};

/** @internal @deprecated v1 compat */
export const _jsxC = (type: any, mutable: any, _flags: any, key: any) => jsx(type, mutable, key);
/** @internal @deprecated v1 compat */
export const _jsxS = (type: any, mutable: any, immutable: any, _flags: any, key: any) =>
jsx(type, { ...immutable, ...mutable }, key);
/** @internal @deprecated v1 compat */
export const _jsxQ = (
type: any,
mutable: any,
immutable: any,
children: any,
_flags: any,
key: any
) => jsx(type, { ...immutable, ...mutable, children }, key);

/**
* @public
* Used by the JSX transpilers to create a JSXNode.
Expand Down

0 comments on commit b1cb34c

Please sign in to comment.