René's URL Explorer Experiment


Title: Is it by design that Angular does not notice array changes during the second check in development mode? · Issue #43187 · angular/angular · GitHub

Open Graph Title: Is it by design that Angular does not notice array changes during the second check in development mode? · Issue #43187 · angular/angular

X Title: Is it by design that Angular does not notice array changes during the second check in development mode? · Issue #43187 · angular/angular

Description: @Pipe({ name: 'reverse', pure: false }) export class ReversePipe implements PipeTransform { transform(value: T[]): T[] { return value.reverse(); } } This is how an unexperienced or forgetful developer could try to implement a pipe tha...

Open Graph Description: @Pipe({ name: 'reverse', pure: false }) export class ReversePipe implements PipeTransform { transform(value: T[]): T[] { return value.reverse(); } } This is how an unexperienced or forgetful dev...

X Description: @Pipe({ name: 'reverse', pure: false }) export class ReversePipe implements PipeTransform { transform<T>(value: T[]): T[] { return value.reverse(); } } This is how an unexperienced or...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Is it by design that Angular does not notice array changes during the second check in development mode?","articleBody":"```typescript\r\n@Pipe({\r\n  name: 'reverse',\r\n  pure: false\r\n})\r\nexport class ReversePipe implements PipeTransform {\r\n  transform\u003cT>(value: T[]): T[] {\r\n    return value.reverse();\r\n  }\r\n}\r\n```\r\n\r\nThis is how an unexperienced or forgetful developer could try to implement a pipe that reverses arrays. This naive implementation is wrong because `reverse()` reverses arrays in-place, so I would expect an `ExpressionChangedAfterItHasBeenChecked` error to be thrown in development mode. But not only is there no such error, the app even seems to work completely fine. The reason is that the array is reversed one more time during the second check, which brings it in its original order. But we cannot see it reflected in the UI because the rendering has already been completed at the time of the second check.\r\n\r\nWhat is even more interesting is that there is no error even if we return a copy of the array we have just reversed,\r\n\r\n```typescript\r\ntransform\u003cT>(value: T[]): T[] {\r\n  value.reverse();\r\n  return [...value];\r\n}\r\n```\r\n\r\nso the problem has not only to do with the fact that the array reference does not change.\r\n\r\nIn both cases, the problem first becomes apparent when the app is built for production, meaning that the second check hides the problem instead of reporting it. Does not that contradict the purpose of the second check? Is it desired that it works this way?","author":{"url":"https://github.com/aweebit","@type":"Person","name":"aweebit"},"datePublished":"2021-08-17T19:34:09Z","url":"https://github.com/angular/angular/issues/43187"}

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:b134e65e-e326-0dc5-a50f-7520768964d3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9EDA:25A901:E75F9E:13C6DC7:6B045D8C
html-safe-noncea32710c6d89b1646701f6a94d540f0020dafef3173401a53086d41aec7d2d834
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RURBOjI1QTkwMTpFNzVGOUU6MTNDNkRDNzo2QjA0NUQ4QyIsInZpc2l0b3JfaWQiOiI4MTk5OTkxNTQwODc0MjM5MzcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2cda396d967eac31dc7b99859ae68a37bde4dccaa9174838be0e77f23fca902d
hovercard-subject-tagissue:973002808
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/43187/issue_layout
twitter:imagehttps://opengraph.githubassets.com/215e4777e129dfa8f0db9b89bed09423db1d6cd53826dd11ef25770b342d38a5/angular/angular/issues/43187
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/215e4777e129dfa8f0db9b89bed09423db1d6cd53826dd11ef25770b342d38a5/angular/angular/issues/43187
og:image:alt@Pipe({ name: 'reverse', pure: false }) export class ReversePipe implements PipeTransform { transform(value: T[]): T[] { return value.reverse(); } } This is how an unexperienced or forgetful dev...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaweebit
hostnamegithub.com
expected-hostnamegithub.com
None2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6
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
release03e114520787ad27289207f153520ef97461127c
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/43187#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F43187
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%2F43187
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/43187
Reloadhttps://github.com/angular/angular/issues/43187
Reloadhttps://github.com/angular/angular/issues/43187
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues841 (841)https://github.com/angular/angular/issues
Pull requests149 (149)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/43187
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/43187
Is it by design that Angular does not notice array changes during the second check in development mode?https://github.com/angular/angular/issues/43187#top
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
core: change detectionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20change%20detection%22
needs reproductionThis issue needs a reproduction in order for the team to investigate furtherhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22needs%20reproduction%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/aweebit
aweebithttps://github.com/aweebit
on Aug 17, 2021https://github.com/angular/angular/issues/43187#issue-973002808
dylhunnhttps://github.com/dylhunn
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5172246876
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5172246923
dylhunnhttps://github.com/dylhunn
core: change detectionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20change%20detection%22
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5172247812
https://github.com/atscott
atscotthttps://github.com/atscott
on Aug 18, 2021https://github.com/angular/angular/issues/43187#issuecomment-901278301
https://stackblitz.com/edit/angular-ivy-kcuyfl?file=src%2Fapp%2Fapp.component.htmlhttps://stackblitz.com/edit/angular-ivy-kcuyfl?file=src%2Fapp%2Fapp.component.html
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
needs reproductionThis issue needs a reproduction in order for the team to investigate furtherhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22needs%20reproduction%22
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5176341854
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
Backloghttps://github.com/angular/angular/milestone/82
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5176341983
https://github.com/aweebit
aweebithttps://github.com/aweebit
on Aug 18, 2021https://github.com/angular/angular/issues/43187#issuecomment-901380498
@atscotthttps://github.com/atscott
https://stackblitz.com/edit/angular-ivy-vuawty?file=src/app/app.component.tshttps://stackblitz.com/edit/angular-ivy-vuawty?file=src/app/app.component.ts
https://github.com/atscott
atscotthttps://github.com/atscott
on Aug 18, 2021https://github.com/angular/angular/issues/43187#issuecomment-901402035
code referencehttps://github.com/angular/angular/blob/3e756f06ee4b5c1a45cc06730650f3ebd4da8ca7/packages/core/src/change_detection/change_detection_util.ts#L19-L20
#20450https://github.com/angular/angular/issues/20450
atscotthttps://github.com/atscott
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 18, 2021https://github.com/angular/angular/issues/43187#event-5176963683
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 18, 2021https://github.com/angular/angular/issues/43187#issuecomment-922333381
automatic conversation locking policyhttps://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 18, 2021https://github.com/angular/angular/issues/43187#event-5323288931
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/43187
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/43187
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
core: change detectionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20change%20detection%22
needs reproductionThis issue needs a reproduction in order for the team to investigate furtherhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22needs%20reproduction%22
BacklogNo due datehttps://github.com/angular/angular/milestone/82
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.