Skip to content

Conversation

@Varixo
Copy link
Member

@Varixo Varixo commented Oct 31, 2025

Add new option for useTask$ blockRender. It helps managing animations and view transitions

@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

🦋 Changeset detected

Latest commit: 0782caa

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

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

@Varixo Varixo moved this from Backlog to In progress in Qwik Development Oct 31, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 31, 2025

Open in StackBlitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8107
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8107
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8107
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8107

commit: ec56c4d

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

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

@wmertens
Copy link
Member

wmertens commented Nov 1, 2025

now that I read it again, blockRender sounds like rendering blocks, not blocking render :)

Maybe just blocking?

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.

three thumbs up, LGTM except maybe the option name

@gnemanja
Copy link
Contributor

gnemanja commented Nov 1, 2025

Maybe it would be nice to include a description which says that useTask will always block rendering when executed on server. This option is only for browser

@Varixo Varixo changed the title feat: introduce blockRender option for useTask$ feat: introduce deferUpdates option for useTask$ Nov 2, 2025
@Varixo
Copy link
Member Author

Varixo commented Nov 3, 2025

now that I read it again, blockRender sounds like rendering blocks, not blocking render :)

Maybe just blocking?

changed to deferUpdates after talking to Jack

@Varixo
Copy link
Member Author

Varixo commented Nov 3, 2025

We need to talk about this change if it should be default to match v1 behavior.
Imo the v1 behavior is not intuitive and we could change it.

@wmertens
Copy link
Member

wmertens commented Nov 5, 2025

We decided that the v1 blocking behavior should stand and we need to enable non-blocking via an option.

The alternative is creating a Promise but not returning it, but that doesn't feel great so the option is still useful

@Varixo Varixo marked this pull request as ready for review November 8, 2025 08:46
@Varixo Varixo requested review from a team as code owners November 8, 2025 08:46
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

It looks awesome to me ✅🙏

@wmertens wmertens moved this from In progress to Waiting For Review in Qwik Development Nov 11, 2025
@wmertens
Copy link
Member

I'd like to rename the option to something that needs to be set to true instead of false.
concurrent would work but it doesn't explain that it's for render only, it still goes synchronous in the component render

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.

LGTM

@wmertens wmertens enabled auto-merge November 14, 2025 11:03
@wmertens wmertens merged commit f959dc8 into build/v2 Nov 14, 2025
14 checks passed
@wmertens wmertens deleted the v2-blocking-task branch November 14, 2025 16:21
@github-project-automation github-project-automation bot moved this from Waiting For Review to Done in Qwik Development Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants