René's URL Explorer Experiment


Title: Fix React nodes being removed from DOM when they are still needed by bengry · Pull Request #7 · microsoft/angular-react · GitHub

Open Graph Title: Fix React nodes being removed from DOM when they are still needed by bengry · Pull Request #7 · microsoft/angular-react

X Title: Fix React nodes being removed from DOM when they are still needed by bengry · Pull Request #7 · microsoft/angular-react

Description: Fixes #1 permanently. Fixes issue were React nodes were removed from the DOM when they were still needed (i.e. Fabric's Pivot component - where PivotItem may not be in the DOM but still needed for later. Fixes ng-templates passed as ReactContent to be re-created every time (visible symptoms were multiple elements of the same type in the VDOM on initial component load, even though only one had a parent element actually contained in the DOM (element.isConnected === true). Please let me know your thoughts on the fix, the idea behind it is that the root cause for needing to unmount Angular DOM elements was due to multiple renders, each creating a new instance of a given React component, unmounting the old one. The amount of calls for the render prop can't be controlled (The React component that was hosted the Angular one, in our case office-ui-fabric-react's CommandBar decides how many times to call the render prop - and since React render props are essentially SFC (stateless functional component), it returns the same JSX for the same props, every time, so calling it more than necessary, although discouraged*, would yield no side-effects). In the original (current) render prop wrapper implementation, a new TemplateRef was created for every render prop call. This PR changes the way render prop wrappers work to never re-create the template, but only re-assign the context on subsequent render calls. Note that JSX is just the VDOM representation of the actual element, if the same JSX is returned no renders to the DOM would occur because of it.

Open Graph Description: Fixes #1 permanently. Fixes issue were React nodes were removed from the DOM when they were still needed (i.e. Fabric's Pivot component - where PivotItem may not be in the DOM but still needed ...

X Description: Fixes #1 permanently. Fixes issue were React nodes were removed from the DOM when they were still needed (i.e. Fabric's Pivot component - where PivotItem may not be in the DOM but still nee...

Opengraph URL: https://github.com/microsoft/angular-react/pull/7

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e084ca07-83e6-69ab-a52a-620783b9c9e8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id807E:F7C4C:E4B4CD:1332971:6B010AC1
html-safe-nonce99dc35dfe852bf8ab9ede6968a1ebddf28155f8bcbc366dec709c633a819d75b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDdFOkY3QzRDOkU0QjRDRDoxMzMyOTcxOjZCMDEwQUMxIiwidmlzaXRvcl9pZCI6Ijc0MzY2ODIzNTUyMzE3NTQ5NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac695c8ed61b4255911ae3a255478c8cb959daeee824e0001613bac6d7f9e271df
hovercard-subject-tagpull_request:209380458
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/angular-react/pull/7/files
twitter:imagehttps://avatars.githubusercontent.com/u/260431?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/260431?s=400&v=4
og:image:altFixes #1 permanently. Fixes issue were React nodes were removed from the DOM when they were still needed (i.e. Fabric's Pivot component - where PivotItem may not be in the DOM but still needed ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/angular-react git https://github.com/microsoft/angular-react.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id144321557
octolytics-dimension-repository_nwomicrosoft/angular-react
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id144321557
octolytics-dimension-repository_network_root_nwomicrosoft/angular-react
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/angular-react/pull/7/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fangular-react%2Fpull%2F7%2Ffiles
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%2Fmicrosoft%2Fangular-react%2Fpull%2F7%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=microsoft%2Fangular-react
Reloadhttps://github.com/microsoft/angular-react/pull/7/files
Reloadhttps://github.com/microsoft/angular-react/pull/7/files
Reloadhttps://github.com/microsoft/angular-react/pull/7/files
microsofthttps://github.com/microsoft
angular-reacthttps://github.com/microsoft/angular-react
Codehttps://github.com/microsoft/angular-react
Issues25 (25)https://github.com/microsoft/angular-react/issues
Pull requests30 (30)https://github.com/microsoft/angular-react/pulls
Actionshttps://github.com/microsoft/angular-react/actions
Projectshttps://github.com/microsoft/angular-react/projects
Wikihttps://github.com/microsoft/angular-react/wiki
Security and qualityhttps://github.com/microsoft/angular-react/security
Insightshttps://github.com/microsoft/angular-react/insights
Ben Grynhaus (bengry)https://github.com/bengry
masterhttps://github.com/microsoft/angular-react/tree/master
fix-unmounting-nodeshttps://github.com/microsoft/angular-react/tree/fix-unmounting-nodes
Conversation 0 https://github.com/microsoft/angular-react/pull/7
Commits 12 https://github.com/microsoft/angular-react/pull/7/commits
Checks 0 https://github.com/microsoft/angular-react/pull/7/checks
Files changed https://github.com/microsoft/angular-react/pull/7/files
Please reload this pagehttps://github.com/microsoft/angular-react/pull/7/files
Fix React nodes being removed from DOM when they are still needed https://github.com/microsoft/angular-react/pull/7/files#top
Show all changes 12 commits https://github.com/microsoft/angular-react/pull/7/files
1c938e7 POC Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/1c938e73886d2ceaf777752c8ba814930775801a
b9b4f67 revert legacy render mode by default Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/b9b4f676c19b62995a2e308067947b520e089b22
0445891 Change TemplateRef render prop to not-recreate every time Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/04458912499d4e9744118d800349de91a53fb96b
d98a54f Change HTML render prop format to match Template renderer Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/d98a54f4874936b37912d9cea3603cf47c4887e5
f08d1db amend 04458912499d4e9744118d800349de91a53fb96b Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/f08d1db06d861b7f772a132bd56da6194f1b22e6
6115e1c amend d98a54f4874936b37912d9cea3603cf47c4887e5 Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/6115e1cff98e16d19675783df7004d25d8bf5dfe
144b776 Change ComponentRef rendenrer to match Template renderer Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/144b77606c6fe0214df8c3efc4e00fa4291e0ef2
8f3c89c Change render props to not re-render when unneeded Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/8f3c89cfbe8db18bea291dc41945f9f64e108d3e
d05d05a Remove workaround for React root nodes not being removed when Angular… Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/d05d05a2a41f001878f2d23a705126ae3ea867c9
e7def80 Change ReactContent to not add already-mounted elements Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/e7def80812bc8cc10e5c66b3afd7a245ff9ce62b
902ae07 Demo app changes Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/902ae07b782ff9957a78a44fbbe0556e99513480
0a13bee Add cross-browser support for checking if a node is in the DOM Aug 19, 2018 https://github.com/microsoft/angular-react/pull/7/commits/0a13bee79ce34964d44d4bca340aa2e49720e056
Clear filters https://github.com/microsoft/angular-react/pull/7/files
Please reload this pagehttps://github.com/microsoft/angular-react/pull/7/files
Please reload this pagehttps://github.com/microsoft/angular-react/pull/7/files
app.component.html https://github.com/microsoft/angular-react/pull/7/files#diff-0d7e95f0c9156aab8fe0e989247277c2486bb05b13ab0714cebb6c3677e008fc
wrapper-component.ts https://github.com/microsoft/angular-react/pull/7/files#diff-a243f39484cff07e723bf2eedac170ab193ec54b9efa1966dc6d3fd0b0fc36a5
react-content.ts https://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
renderer.ts https://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
renderprop-helpers.ts https://github.com/microsoft/angular-react/pull/7/files#diff-c1a11ab849f4fae738777f8965a566b61f401a0ca9efc14c06a27e5a6d348587
dom-utils.ts https://github.com/microsoft/angular-react/pull/7/files#diff-13439f5909aa308fce14e67e49ab18fd024022667c052748c8ab4a34e052852b
index.ts https://github.com/microsoft/angular-react/pull/7/files#diff-36b6bd0009d7e086c92f4d5b1e6cb40d1d5a1b883fbd187da60688b89877996b
apps/demo/src/app/app.component.htmlhttps://github.com/microsoft/angular-react/pull/7/files#diff-0d7e95f0c9156aab8fe0e989247277c2486bb05b13ab0714cebb6c3677e008fc
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/apps/demo/src/app/app.component.html
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
https://github.com/microsoft/angular-react/pull/7/files#diff-0d7e95f0c9156aab8fe0e989247277c2486bb05b13ab0714cebb6c3677e008fc
https://github.com/microsoft/angular-react/pull/7/files#diff-0d7e95f0c9156aab8fe0e989247277c2486bb05b13ab0714cebb6c3677e008fc
https://github.com/microsoft/angular-react/pull/7/files#diff-0d7e95f0c9156aab8fe0e989247277c2486bb05b13ab0714cebb6c3677e008fc
libs/core/src/lib/components/wrapper-component.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-a243f39484cff07e723bf2eedac170ab193ec54b9efa1966dc6d3fd0b0fc36a5
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/components/wrapper-component.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
https://github.com/microsoft/angular-react/pull/7/files#diff-a243f39484cff07e723bf2eedac170ab193ec54b9efa1966dc6d3fd0b0fc36a5
https://github.com/microsoft/angular-react/pull/7/files#diff-a243f39484cff07e723bf2eedac170ab193ec54b9efa1966dc6d3fd0b0fc36a5
https://github.com/microsoft/angular-react/pull/7/files#diff-a243f39484cff07e723bf2eedac170ab193ec54b9efa1966dc6d3fd0b0fc36a5
libs/core/src/lib/renderer/react-content.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/renderer/react-content.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
https://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
https://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
https://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
https://github.com/microsoft/angular-react/pull/7/files#diff-1b276bb294608bc701fc3b37942db1285594fd5e347f8e0ccc0467c25a0b6619
libs/core/src/lib/renderer/renderer.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/renderer/renderer.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
https://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
https://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
https://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
https://github.com/microsoft/angular-react/pull/7/files#diff-a1cf3b8e640a3b946247f98d5a2a9edd7f32d0012d28b2aee95b1d466b97a430
libs/core/src/lib/renderer/renderprop-helpers.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-c1a11ab849f4fae738777f8965a566b61f401a0ca9efc14c06a27e5a6d348587
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/renderer/renderprop-helpers.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
https://github.com/microsoft/angular-react/pull/7/files#diff-c1a11ab849f4fae738777f8965a566b61f401a0ca9efc14c06a27e5a6d348587
libs/core/src/lib/utils/dom/dom-utils.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-13439f5909aa308fce14e67e49ab18fd024022667c052748c8ab4a34e052852b
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/utils/dom/dom-utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
libs/core/src/lib/utils/dom/index.tshttps://github.com/microsoft/angular-react/pull/7/files#diff-36b6bd0009d7e086c92f4d5b1e6cb40d1d5a1b883fbd187da60688b89877996b
View file https://github.com/microsoft/angular-react/blob/0a13bee79ce34964d44d4bca340aa2e49720e056/libs/core/src/lib/utils/dom/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/angular-react/pull/7/{{ revealButtonHref }}
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.