') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Update FlatList Optimization Guide for FCs by Azelisi · Pull Request #3700 · react/react-native-website · GitHub
Skip to content

Update FlatList Optimization Guide for FCs - #3700

Merged
NickGerleman merged 3 commits into
react:mainfrom
Azelisi:patch-1
Jul 8, 2023
Merged

Update FlatList Optimization Guide for FCs#3700
NickGerleman merged 3 commits into
react:mainfrom
Azelisi:patch-1

Conversation

@Azelisi

Copy link
Copy Markdown
Contributor

My fix solves the problem Update FlatList Optimization Guide for FCs #3677

@netlify

netlifyBot commented Apr 24, 2023

Copy link
Copy Markdown

Deploy Preview for react-native ready!

NameLink
🔨 Latest commitf7c7c67
🔍 Latest deploy loghttps://app.netlify.com/sites/react-native/deploys/64a8c8e87a65380008dca6a7
😎 Deploy Previewhttps://deploy-preview-3700--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Azelisi

Copy link
Copy Markdown
ContributorAuthor

Replaced Use shouldComponent Update with Use memo

componentUpdate
memo

@NickGerlemanNickGerleman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great!

Comment threaddocs/optimizing-flatlist-configuration.md Outdated
@Simek

Simek commented Jul 8, 2023

Copy link
Copy Markdown
Collaborator

@NickGerleman Can we merge this in? 🙂

@NickGerleman
NickGerleman merged commit 21a3300 into react:mainJul 8, 2023
sunnylqm added a commit to reactnativecn/react-native-website that referenced this pull request Aug 5, 2023
* Update Debugging docs to no longer recommend Remote debugging (react#3702)
Co-authored-by: Alex Hunt <hello@alexhunt.io>
* Bump fast-xml-parser from 4.2.4 to 4.2.5 (react#3777)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-parser@v4.2.4...v4.2.5)
---
updated-dependencies:
- dependency-name: fast-xml-parser
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Upgrade got dependency (react#3776)
* feature: Move to GA4 (UA being reprecated in June)
Google Analytics is deprecating the older clients. This is the first
step to enable to newer client. This should be followed with a step to
remove the old client once we know data is flowing.
* Upgrade got dependency
Resolves dependabot alerts #26
* Use `https` links over `http` (react#3761)
* [docs] Update/simplify info around Metro for env setup (react#3673)
* [docs] Add Metro guide, update Metro config references (react#3772)
* [docs] Remove static config note in Metro guide, adjust formatting (react#3782)
* Improving Grammar and Clarity.md (react#3783)
Improving Grammar and Clarity in React Native's Performance Description
* Fix docs for onResponderGrant (react#3785)
* react-native-gradle-plugin renamed to @react-native/gradle-plugin (react#3786)
* Update _integration-with-existing-apps-kotlin.md
* Update _integration-with-existing-apps-kotlin.md
* Update _integration-with-existing-apps-java.md
* Update _integration-with-existing-apps-java.md
* Update _integration-with-existing-apps-kotlin.md
* Update how-to-build-from-source for 0.72+ (react#3659)
* Clarify documentation for turbomodules (react#3787)
* Clarify documentation for turbomodules
`codegenConfig` is stated in text that it's an array, but in code example it's an object.
Either the text or the code example should change.
* Fix linting issue
* Update the PR to reflect knowledge that the code sample is correct but documentation wrong
* Update FlatList Optimization Guide for FCs (react#3700)
* Update FlatList Optimization Guide for FCs
* fix lint
* Update docs/optimizing-flatlist-configuration.md
---------
Co-authored-by: Егорик <86266852+Huinko@users.noreply.github.com>
Co-authored-by: Nick Gerleman <nick@nickgerleman.com>
* [docs] Add guidance on repo build scripts (react#3788)
* [docs] add Chain React 2023 playlist link on staying-updated (react#3790)
* Bump semver from 5.7.1 to 5.7.2 (react#3791)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)
---
updated-dependencies:
- dependency-name: semver
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Docusaurus v2.4.1 (react#3778)
* Bump word-wrap from 1.2.3 to 1.2.4 (react#3794)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)
---
updated-dependencies:
- dependency-name: word-wrap
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: iOS backwards compatibility update (react#3775)
* Update backward-compatibility-fabric-components.md
Ensure backwards-compat docs refer to all necessary code changes.
reactwg/react-native-new-architecture#8 (comment)
* Update docs/the-new-architecture/backward-compatibility-fabric-components.md
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
* trim whitespace and fix typo
---------
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
* [website] swizzle DocVersionBanner, tweak wording (react#3800)
* tweak: improve wordiness on docs about bumping monorepo packages (react#3805)
* Fix typo in architecture-glossary.md (react#3806)
* docs: change js to tsx (react#3808)
* Update website to use JDK 17 (react#3812)
LGTM.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Gabriel Donadel Dall'Agnol <donadeldev@gmail.com>
Co-authored-by: Alex Hunt <hello@alexhunt.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Friedman <blakef@meta.com>
Co-authored-by: Pranav Yadav <Pranavyadav3912@gmail.com>
Co-authored-by: Waseem Kurne <55435990+waseemk7@users.noreply.github.com>
Co-authored-by: Pieter De Baets <pieterdb@meta.com>
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: Stefan Wallin <github@stefan-wallin.se>
Co-authored-by: Егорик <86266852+Azelisi@users.noreply.github.com>
Co-authored-by: Егорик <86266852+Huinko@users.noreply.github.com>
Co-authored-by: Nick Gerleman <nick@nickgerleman.com>
Co-authored-by: David Leuliette <dleuliette@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Connor Mullins <connorpmullins@gmail.com>
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
Co-authored-by: Lorenzo Sciandra <lsciandra@microsoft.com>
Co-authored-by: Stanley Ugwu <stanleyugwu2018@gmail.com>
Co-authored-by: kong <duguyihou@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Azelisi@Simek@NickGerleman@facebook-github-bot