Fix React Doctor findings#44
Draft
FiberJW wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
React Doctor reported correctness, performance, and maintainability issues across the app. The highest-impact items were:
.expowas not fully ignored, which risks committing machine-specific simulator/device history and dev-server settings. This is repo hygiene rather than a user-facing bug, but it can create noisy or misleading diffs.FlatListscreens rebuiltrenderItemcallbacks on every screen render. On real devices that can make rows do extra work, which shows up as avoidable list jank on larger lists or slower phones.Imagefromreact-native, which does not provide Expo Image's caching behavior. Users can see more reloads, flicker, and repeated image fetches while browsing anime, character, profile, and landing-page imagery.After fixing those, I continued through the remaining React Doctor output so the full scan is clean instead of leaving follow-up warnings in the same branch.
How
.expo/directory.expo-image, then migrated app and website image usage fromreact-nativeimage components to Expo Image where React Doctor flagged caching-sensitive usage.FlatListcallbacks and key extractors in the related anime, character, profile, discover, and anime list flows.keyprops that were duplicating list-owned keys.forEach, prop-to-state sync effects, constructed context values, manual memoization that was no longer needed, index keys in skeleton lists, dynamic ScrollView padding, and unsupported React Native shadow styling..graphqldocuments, regeneratedgraphql/generated.ts, and added a small codegen postprocess step that keeps generated-only helpers module-private when the app does not import them.Test Plan
bun run gqlbun run lintnpx tsc --noEmitgit diff --checknpx react-doctor@latest --verboseNo issues found!100 / 100Manual simulator QA was not run in this pass; validation was focused on React Doctor plus local static checks.
Summary by cubic
Fixes React Doctor findings across the app to improve performance and maintainability. Lists scroll smoother, images cache by default, and GraphQL code is simpler; the scan now passes with 100/100.
Performance
react-nativeimages withexpo-imageacross app and website to enable caching and reduce flicker.FlatListrenderItem/keyExtractor functions and removed duplicate item keys to cut re-renders.Refactors
.graphql, regeneratedgraphql/generated.ts, and addedtasks/trim-generated-graphql-exports.cjsto keep helper exports local..expo/; removed stale/generated files and unused dependencies; addedexpo-imageplugin and droppedgraphql-tag.Written for commit 34d6ff1. Summary will update on new commits.