docs(cndocs): remove React.useState/useRef prefix in new-architecture docs#1036
Conversation
… docs - custom-cxx-types.md: React.useState → useState (5 occurrences) - layout-measurements.md: React.useRef → useRef (1 occurrence) Aligns with upstream React import removal pattern (React 17+ JSX transform).
❌ Deploy Preview for reactnativecn failed. Why did it fail? →
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThree code snippets in two documentation files replace ChangesHook namespace updates in doc snippets
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Summary
Sync 2
cndocs/files with upstream — removeReact.useState/React.useRefprefix to match the React 17+ JSX transform pattern used upstream.Translation files changed
cndocs/the-new-architecture/custom-cxx-types.mdReact.useState→useState(5 occurrences)cndocs/the-new-architecture/layout-measurements.mdReact.useRef→ref(1 occurrence)Website config / deps sync
No
cnwebsite/config or dependency changes needed this batch. Upstream changes since PR #1035 were limited towebsite/footer link reorganization and styling tweaks — CN website has its own independent footer structure.False positives (already synced, no changes needed)
8 stub files (
checkbox,clipboard,datepickerandroid,datepickerios,imagepickerios,segmentedcontrolios,statusbarios,timepickerandroid) are already properly translated CN versions of "Removed from React Native" notices.colors.mdis also already fully translated — differences are only in translated prose, not structure or code.Notes
sync-translations.shoutput until this PR merges toproduction, because the script compares upstream timestamps againstproduction.website/→cnwebsite/config sync needed: upstream's recentdocusaurus.config.tschanges (copyright text, footer link reorganization) don't apply to CN's independent footer/branding.Summary by CodeRabbit
useRefhook usage in the sample snippet.