Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): qwik react #6722

Merged
merged 3 commits into from
Jul 25, 2024
Merged

fix(v2): qwik react #6722

merged 3 commits into from
Jul 25, 2024

Conversation

Varixo
Copy link
Member

@Varixo Varixo commented Jul 25, 2024

This PR should fix most problems with qwik react in v2

@Varixo Varixo requested a review from a team as a code owner July 25, 2024 18:43
Copy link

changeset-bot bot commented Jul 25, 2024

⚠️ No Changeset found

Latest commit: 536876d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -189 to -207
// This is only used in v1, in v2 we use componentQrl directly
function QwikComponent(props: PublicProps<PROPS>, key: string | null, flags: number): JSXNode {
assertQrl(componentQrl);
assertNumber(flags, 'The Qwik Component was not invoked correctly');
const hash = qTest ? 'sX' : componentQrl.$hash$.slice(0, 4);
const finalKey = hash + ':' + (key ? key : '');
return _jsxSorted(
Virtual,
{
props,
[OnRenderProp]: componentQrl,
[QSlot]: props[QSlot],
},
null,
props.children,
flags,
finalKey
) as any;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason for the qwik-react here is returning error. This is not needed in v2, so I removed it

@@ -232,6 +232,7 @@ export const vnode_diff = (
}
} else if (jsxValue === SkipRender) {
// do nothing, we are skipping this node
journal = [];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any better way to ignore journal? @mhevery

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! BTW qwik-react will need a version bump for v2 compatibility, might as well call it 1.0.0 now

LGTM

@mhevery mhevery merged commit 49ef55e into build/v2 Jul 25, 2024
22 checks passed
@mhevery mhevery deleted the varixo/v2-fix-qwik-react branch July 25, 2024 22:57
@Varixo Varixo self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants