René's URL Explorer Experiment


Title: feat(core): unwrap resources into computed/effect and @resolved / @loading / @error / @idle · Issue #70202 · angular/angular · GitHub

Open Graph Title: feat(core): unwrap resources into computed/effect and @resolved / @loading / @error / @idle · Issue #70202 · angular/angular

X Title: feat(core): unwrap resources into computed/effect and @resolved / @loading / @error / @idle · Issue #70202 · angular/angular

Description: Which @angular/* package(s) are relevant/related to the feature request? core, compiler, compiler-cli, language-service Description This is a proof of concept / discussion, not a finished design. I implemented a local experiment on an An...

Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? core, compiler, compiler-cli, language-service Description This is a proof of concept / discussion, not a finished design. I...

X Description: Which @angular/* package(s) are relevant/related to the feature request? core, compiler, compiler-cli, language-service Description This is a proof of concept / discussion, not a finished design. I...

Opengraph URL: https://github.com/angular/angular/issues/70202

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(core): unwrap resources into computed/effect and @resolved / @loading / @error / @idle","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\n\ncore, compiler, compiler-cli, language-service\n\n### Description\n\nThis is a **proof of concept / discussion**, not a finished design. I implemented a local experiment on an Angular fork to explore whether async readiness can become a first-class property of the reactive graph and of control flow, the same way Solid.js 2.0 made async a property of computations instead of a separate resource primitive.\n\nI am **not planning to open a PR**. The POC only exists to make the trade-offs concrete. The useful next step is a design discussion: which read sites should be legal, and what “not ready” means in each of them.\n\n**Inspiration:** [Solid.js 2.0](https://www.solidjs.com/blog/solid-2-0-rc-the-big-reveal) — async `createMemo`, `\u003cLoading>` as the UI boundary for “not ready”, and `isPending` / `latest` for in-flight vs stale-while-revalidate. Docs: [solid 2.0 async data](https://github.com/solidjs/solid/blob/next/documentation/solid-2.0/05-async-data.md).\n\nAngular already has an excellent `resource()` with statuses (`idle` | `loading` | `reloading` | `resolved` | `local` | `error`). What is still awkward:\n\n1. Templates must branch on `status()` / `hasValue()` everywhere a derived value is read.\n2. `computed()` that reads `resource.value()` is `T | undefined` and does not pause.\n3. `effect()` that reads a resource either runs too early or throws.\n4. Chaining resources needs `params: ({chain}) => chain(other)`, which does not compose through an intermediate `computed()`.\n\nRelated but different: #54032 asked for `computed(() => promise, {async: true})`. This proposal keeps `resource()` as the async source and focuses on **unwrapping** and **boundaries**.\n\n#### Reproduction\n\nThe StackBlitz compiles `@resolved` against vendored tarballs of the local fork (not public npm 22.1).\n\n- StackBlitz: https://stackblitz.com/github/RomainDood/demo-resolved-control-flow\n- Demo repo: https://github.com/RomainDood/demo-resolved-control-flow\n\nWhat to observe:\n\n1. **First paint / Reset** — `@idle` (no request yet).\n2. **Load Ada** — `@loading`, then name + chained greeting.\n3. **Reload** — previous name stays (SWR).\n4. **Load Grace** — new load, previous content is replaced after loading.\n5. **Error** — `@error`; the effect does not log.\n\n#### Source (if you want to inspect the POC)\n\nThe compiler + runtime changes live on my fork, not in the demo app:\n\n- https://github.com/RomainDood/angular/tree/feat/settled-computed-async-pending\n\nNo PR to `angular/angular` from me. Use that branch only if the idea is worth reading through.\n\n### Proposed solution\n\nKeep `resource()`. Add a small unwrap + a control-flow boundary whose names match resource statuses.\n\n```ts\nuser = resolved(this.userResource);\n\nfullName = computed(() => {\n  const u = this.user(); // T, not T | undefined\n  return `${u.first} ${u.last}`;\n});\n\neffect(() => {\n  console.log(this.fullName()); // runs only when resolved\n});\n\ndetails = resource({\n  params: () => this.fullName(), // waits until ready\n  loader: ({params}) => fetchDetails(params),\n});\n```\n\n```html\n@resolved {\n  \u003ch2>{{ fullName() }}\u003c/h2>\n} @loading {\n  \u003cp>Loading…\u003c/p>\n} @error {\n  \u003cp>Failed to load\u003c/p>\n} @idle {\n  \u003cp>No request yet\u003c/p>\n}\n```\n\n**Compile-time, not runtime:** reading `fullName()` / `resolved()` in a template **without** an `@resolved` block is a **compilation error** (extended template diagnostic). The app does not boot and then throw.\n\n#### Open questions (more important than the POC choices)\n\nOnce a `computed()` waits for a resource to be resolved, **where is it legal to read it?** The POC picked one answer so the demo could run. That is not a recommendation.\n\n1. **`effect()`** — Allow the read, but run the callback only when the value is resolved? Forbid it and force `status()` / `hasValue()`? If allowed, what happens on `error` (skip, like loading, or surface the error)?\n2. **`linkedSignal()`** — Allow? Pause until ready? Keep the previous local value? Forbid, because a writable linked state plus `NotReady` is easy to get wrong?\n3. **`params` of another `resource()`** — Allow `params: () => this.fullName()` so composition goes through computed? Keep `chain()` as the only official path? If allowed: `idle` → downstream `idle`, `loading` → `loading`, `error` → `error`?\n4. **`afterRenderEffect` / other reactive consumers** — Same rules as `effect()`, or stricter?\n5. **Templates outside `@resolved`** — The POC is a **compile-time error**, not a runtime throw. Is that the right default, or should it fail at runtime / be allowed with manual branching?\n6. **Nested `computed()`** — If `greeting` reads `fullName` which reads `resolved(user)`, does the whole chain become async? (POC: yes.)\n7. **Reload / SWR** — Does `reloading` still produce `T` so effects and the main branch keep running, or is reload “not ready” again?\n\nPOC semantics we used *only to have something runnable*:\n\n| Resource status | `resolved()` | Template | `effect` / `params` |\n| --- | --- | --- | --- |\n| `resolved` / `local` | `T` | main branch | run |\n| `reloading` | previous `T` (SWR) | keep main | run |\n| `idle` | `Idle` | `@idle` (falls back to `@loading` if omitted) | skip / idle |\n| `loading` | `NotReady` | `@loading` | skip / wait |\n| `error` | throw `resource.error()` | `@error` | skip (effect) / error (params) |\n\nOther POC notes, also open:\n\n- No public `computedAsync`. A normal `computed()` that reads `resolved()` becomes async and pauses.\n- Template reads of those values **without `@resolved` are a compile-time error**, not a runtime error.\n- `@loading` / `@error` reuse the same tokens as `@defer`, but attach to `@resolved`. `@idle` is `@resolved`-only.\n\nAgain: **no PR from me**. If the team wants to explore this, the open questions above matter more than the particular API I wired in the fork.\n\n### Alternatives considered\n\n1. **Keep branching on `status()` / `hasValue()`** — works, but every derived `computed` and every template repeats the same state machine. Easy to read `value()` too early.\n2. **`@if (resource.hasValue())`** — loses a first-class loading/error/idle slot and does not compose through `fullName` / `greeting`.\n3. **`params: ({chain}) => chain(other)` only** — good for resource-to-resource, not for `computed` in the middle or for effects.\n4. **Async `computed(() => promise)` (#54032)** — a different model (computed *is* the fetch). This POC keeps `resource()` as the fetch primitive and makes the *graph* understand readiness.\n5. **A library / helper** — `resolved()` could be user-land; `@resolved` cannot. The interesting part is the compiler boundary + CD catching `Idle` / `NotReady` without going through `ErrorHandler`.\n\nHappy to adjust names, drop `@error` / `@idle`, or keep `chain()` as the only official composition path. The goal of this issue is to discuss whether the Solid 2.0-style “async is part of the graph” direction is something Angular wants to explore on top of `resource()`, and **which read sites should be allowed**.","author":{"url":"https://github.com/RomainDood","@type":"Person","name":"RomainDood"},"datePublished":"2026-08-14T05:45:50Z","url":"https://github.com/angular/angular/issues/70202"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d668126f-1a6f-52aa-0436-bc520b6bb137
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8EF4:2AAD2E:2E9A993:3E3D361:6B01DEF4
html-safe-noncebeb130bab7c707d636176ac99a284fbc7347cea0ebfde5c83c641e1bb4a83750
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUY0OjJBQUQyRToyRTlBOTkzOjNFM0QzNjE6NkIwMURFRjQiLCJ2aXNpdG9yX2lkIjoiMzM1MzUxMjk3MDQ3ODAxODI5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc33eee459dfd680f6a63d41e762082c8c9af198f2a5783e8e69f485c9116e15a
hovercard-subject-tagissue:5148722947
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/70202/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dd5d2c620a334bef39d877d1de86b60b434d897488f343e95577ac7f97981de0/angular/angular/issues/70202
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dd5d2c620a334bef39d877d1de86b60b434d897488f343e95577ac7f97981de0/angular/angular/issues/70202
og:image:altWhich @angular/* package(s) are relevant/related to the feature request? core, compiler, compiler-cli, language-service Description This is a proof of concept / discussion, not a finished design. I...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRomainDood
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/70202#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F70202
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F70202
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/70202
Reloadhttps://github.com/angular/angular/issues/70202
Reloadhttps://github.com/angular/angular/issues/70202
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests142 (142)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/70202
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/70202
feat(core): unwrap resources into computed/effect and @resolved / @loading / @error / @idlehttps://github.com/angular/angular/issues/70202#top
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/RomainDood
RomainDoodhttps://github.com/RomainDood
on Aug 14, 2026https://github.com/angular/angular/issues/70202#issue-5148722947
Solid.js 2.0https://www.solidjs.com/blog/solid-2-0-rc-the-big-reveal
solid 2.0 async datahttps://github.com/solidjs/solid/blob/next/documentation/solid-2.0/05-async-data.md
#54032https://github.com/angular/angular/issues/54032
https://stackblitz.com/github/RomainDood/demo-resolved-control-flowhttps://stackblitz.com/github/RomainDood/demo-resolved-control-flow
https://github.com/RomainDood/demo-resolved-control-flowhttps://github.com/RomainDood/demo-resolved-control-flow
https://github.com/RomainDood/angular/tree/feat/settled-computed-async-pendinghttps://github.com/RomainDood/angular/tree/feat/settled-computed-async-pending
Async computed signal - Add the ability to easily create async signals with dependencies #54032https://github.com/angular/angular/issues/54032
angular-robothttps://github.com/apps/angular-robot
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
gemini-triagedhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22gemini-triaged%22
on Aug 14, 2026https://github.com/angular/angular/issues/70202#event-29441335852
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Aug 14, 2026https://github.com/angular/angular/issues/70202#event-29441336608
JeanMechehttps://github.com/JeanMeche
duplicatehttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Aduplicate
New @async block #53601https://github.com/angular/angular/issues/53601
on Aug 14, 2026https://github.com/angular/angular/issues/70202#event-29444632320
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Oct 20, 2026https://github.com/angular/angular/issues/70202#issuecomment-6280292947
automatic conversation locking policyhttps://github.com/angular/angular/blob/f0fbced1c55bc8b8ed9df01cea99df42f3e7eae3/contributing-docs/auto-issue-locking.md
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Oct 20, 2026https://github.com/angular/angular/issues/70202#event-33697247744
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/70202
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/70202
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.