Skip to content

feat(core): add non-QRL API aliases#8690

Draft
thejackshelton wants to merge 1 commit into
QwikDev:build/v2from
thejackshelton:feat/non-qrl-api-compat
Draft

feat(core): add non-QRL API aliases#8690
thejackshelton wants to merge 1 commit into
QwikDev:build/v2from
thejackshelton:feat/non-qrl-api-compat

Conversation

@thejackshelton

@thejackshelton thejackshelton commented Jun 1, 2026

Copy link
Copy Markdown
Member

Why

This adds markerless API entry points so users can write the major callback APIs without the QRL suffix or JSX event marker, while existing QRL-based usage continues to work.

The design is intentionally compatibility-first: these new APIs accept already-created QRLs as well as plain functions. That gives us the runtime/type surface needed for the markerless AI inferred compiler approach, where a future compiler pass can auto-inject QRL wrappers before the Qwik optimizer runs.

What changed

  • Add non-QRL aliases such as component(), useTask(), useComputed(), useResource(), useSerializer(), useStyles(), useVisibleTask(), and related callback APIs.
  • Add no-dollar JSX event typings and optimizer support so onClick can lower like onClick$ when a QRL is supplied.
  • Keep existing QRL APIs working unchanged.
  • Add tests, including an E2E case for onClick={$(() => {})}, proving the compiler-backed path works.

Testing

  • pnpm build.full
  • pnpm vitest run packages/qwik/src/core/shared/jsx/types/jsx-types.unit.tsx packages/qwik/src/core/shared/utils/event-names.unit.ts packages/qwik/src/core/use/use-computed.unit.ts packages/qwik/src/core/use/use-task.unit.ts packages/qwik-router/src/runtime/src/use-functions.unit.ts packages/qwik-react/src/react/qwik-react-aliases.unit.tsx
  • pnpm playwright test e2e/qwik-e2e/tests/events.e2e.ts -g "qrl handler passed to no-dollar event" --browser=chromium --config e2e/qwik-e2e/playwright.config.ts --workers=1 --max-failures=1
  • INSTA_UPDATE=always cargo test --lib
  • cargo test example_2 -- --nocapture

@thejackshelton thejackshelton requested review from a team as code owners June 1, 2026 04:09
@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 348b507

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@qwik.dev/core Patch
@qwik.dev/router Patch
@qwik.dev/react Patch
eslint-plugin-qwik Patch
create-qwik Patch

Not sure what this means? Click here to learn what changesets are.

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

@maiieul maiieul moved this to Waiting For Review in Qwik Development Jun 1, 2026
@thejackshelton thejackshelton force-pushed the feat/non-qrl-api-compat branch from 2e2cdd8 to a562356 Compare June 1, 2026 04:11
@thejackshelton thejackshelton marked this pull request as draft June 1, 2026 04:12
@maiieul maiieul moved this from Waiting For Review to In progress in Qwik Development Jun 1, 2026
@thejackshelton thejackshelton force-pushed the feat/non-qrl-api-compat branch from a562356 to 5f82b65 Compare June 1, 2026 04:15
@pkg-pr-new

pkg-pr-new Bot commented Jun 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8690

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8690

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8690

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8690

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8690

commit: 348b507

@thejackshelton thejackshelton force-pushed the feat/non-qrl-api-compat branch from 5f82b65 to 348b507 Compare June 1, 2026 04:23
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview a562356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants