docs(cndocs): 同步翻译更新 2026-02-20(高质量)#1001
Conversation
❌ Deploy Preview for reactnativecn failed. Why did it fail? →
|
📝 WalkthroughWalkthroughThe pull request comprehensively updates documentation files across the cndocs directory, expanding API references with detailed explanations, restructuring content using Tabs/TabItem components for multi-language code examples, and refining descriptive guidance. Additionally, TouchableWithoutFeedback receives API updates introducing new accessibility props and event signatures. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes The diff spans multiple documentation files with heterogeneous changes: API signature updates and surface additions (TouchableWithoutFeedback), substantial content restructuring with new component examples across multiple files (Tabs/TabItem integration), expanded reference sections, and platform-specific guidance refinements. While individual cohorts may appear homogeneous, the variety of change types (API declarations, documentation expansion, content restructuring, multi-language examples) and density of modifications across numerous files requires careful verification of API consistency, accessibility prop correctness, event typing alignment, and documentation accuracy. Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (2)
cndocs/shadow-props.md (1)
40-48:shadowOffset.heightnegation makes the Y-axis slider direction counterintuitive.Both the JS (Line 43) and TS (Line 148) examples pass
-shadowOffsetHeighttoshadowOffset.height. The slider range is-50to50, so moving it to a positive value actually moves the shadow up (negative height), which is the inverse of React Native's convention (positive height = shadow moves down). An alternative that avoids negation is inverting the slider range:♻️ Proposed fix (JS and TS examples)
<ShadowPropSlider label="shadowOffset - Y" - minimumValue={-50} - maximumValue={50} + minimumValue={-50} + maximumValue={50} value={shadowOffsetHeight} onValueChange={setShadowOffsetHeight} />And in the
shadowOffsetstyle object:shadowOffset: { width: shadowOffsetWidth, - height: -shadowOffsetHeight, + height: shadowOffsetHeight, },This removes the negation and preserves the intuitive mapping where a positive slider value moves the shadow downward, matching the documented
shadowOffsetconvention.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cndocs/shadow-props.md` around lines 40 - 48, Remove the unary negation on shadowOffset.height and flip the slider's min/max so the slider's positive values move the shadow downward; specifically update both the JS and TS examples to set shadowOffset: { width: shadowOffsetWidth, height: shadowOffsetHeight } (no leading minus) and invert the slider configuration that produces shadowOffsetHeight (swap its min/max) so the control is intuitive; make the change for the variables and UI controls referenced as shadowOffsetHeight, shadowOffsetWidth, and shadowOffset in the examples.cndocs/improvingux.md (1)
416-489: HitSlop example is missing the JS/TSTabswrapper present in every other example on this page.The TextInput (lines 20–209) and KeyboardAvoidingView (lines 215–410) examples both use
<Tabs>/<TabItem>with separate JavaScript and TypeScript variants. The HitSlop SnackPlayer block uses neither, and also omits the&ext=jsparameter used in the other JS tabs. Consider wrapping it in the same<Tabs>structure and adding a TypeScript variant for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cndocs/improvingux.md` around lines 416 - 489, The SnackPlayer HitSlop example is missing the consistent Tabs/TabItem wrapper and a TypeScript variant; update the block so it matches the other examples by wrapping the SnackPlayer in a <Tabs> with two <TabItem> children (one for JavaScript and one for TypeScript), ensure the JS tab uses the &ext=js parameter in its SnackPlayer URL and add a TS variant that converts the App component to TypeScript (including any props/types if needed); keep the inner component name App and the same hitSlop usage so the example behavior is unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cndocs/debugging-native-code.md`:
- Around line 31-61: The section headings "#### Android(Java/Kotlin)" and "####
iOS(Objective-C/Swift)" under the main "## 查看日志" heading should be demoted to h3
to maintain proper heading hierarchy; change those two "####" headings to "###"
so they no longer skip h3 and the markdownlint MD001 warning is resolved,
leaving the contained code blocks and commands unchanged.
In `@cndocs/improvingux.md`:
- Line 596: Update the markdown link for Material Design that currently reads
"[Material Design](https://material.io/)" to point to the Material Design 3 site
by replacing the URL with "https://m3.material.io/"; leave the link text
unchanged so it becomes "[Material Design](https://m3.material.io/)". Ensure
only the URL is updated wherever the exact markdown string "[Material
Design](https://material.io/)" appears in the document.
- Line 493: Update the stale reference to react-native-platform-touchable in the
TouchableNativeFeedback documentation: replace the broken react-community URL
with either the archived mirror
https://github.com/rnc-archive/react-native-platform-touchable and add a short
deprecation note, or remove the link entirely and instead recommend using
react-native-gesture-handler buttons or the built-in Pressable as the modern
cross-platform alternative; ensure the paragraph mentions
TouchableNativeFeedback and the replacement options
(react-native-gesture-handler, Pressable) so readers know the recommended
fallbacks for iOS and API <21.
- Line 66: Replace the unsafe direct `.current` accesses in the JS examples with
null-safe checks: change calls like `emailInput.current.focus()` and
`emailInput.current.blur()` to optional chaining or a guard (e.g.,
`emailInput.current?.focus()` / `emailInput.current?.blur()` or `if
(emailInput.current) emailInput.current.focus()`), updating the
`onSubmitEditing` handler and the KeyboardAvoidingView/blur usage so they match
the TS examples' pattern and avoid potential null dereference.
In `@cndocs/statusbar.md`:
- Line 10: The first body heading is using h3 ("### 和导航器一起使用") but must be h2 to
follow Docusaurus frontmatter rules; change the heading token from "###
和导航器一起使用" to "## 和导航器一起使用" so the body’s first heading is h2.
- Around line 300-316: Add the same deprecation warning text shown on the
setNetworkActivityIndicatorVisible() method to the
networkActivityIndicatorVisible prop description (mark it as deprecated and note
iOS 13+ no longer supports the network activity indicator) so both API docs are
consistent; also update the prop tables for networkActivityIndicatorVisible and
showHideTransition to include the missing "必需" column with appropriate values
(e.g., `false` for networkActivityIndicatorVisible and the correct required
boolean/`false` for showHideTransition) following the same table structure used
elsewhere in this file so formatting matches other prop entries.
In `@cndocs/touchablewithoutfeedback.md`:
- Around line 507-511: Add a one-line description for the `nativeID` prop to
match other peer props: explain that `nativeID` is the native view identifier
used for linking native UI elements (string), and note its relationship with
`id` (that `id` overrides `nativeID` when both are provided); update the
`nativeID` entry in the TouchableWithoutFeedback docs so it mirrors the `id`
explanation and clarifies purpose and precedence.
- Line 469: Fix the minor Chinese grammar in touchablewithoutfeedback.md by
changing the phrase "不会调用" to the passive form "不会被调用" in the sentence that
reads "当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent)
形式的事件。", updating only that phrase so it becomes
"当触摸释放时调用,但如果被取消则不会被调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent)
形式的事件。"
- Around line 299-301: Add the missing markdown horizontal rule separator before
the `onAccessibilityAction` prop section: locate the end of the `aria-selected`
prop block and insert a `---` divider so `aria-selected` and
`onAccessibilityAction` are separated; ensure the `onAccessibilityAction` header
and its content remain unchanged after adding the `---`.
---
Nitpick comments:
In `@cndocs/improvingux.md`:
- Around line 416-489: The SnackPlayer HitSlop example is missing the consistent
Tabs/TabItem wrapper and a TypeScript variant; update the block so it matches
the other examples by wrapping the SnackPlayer in a <Tabs> with two <TabItem>
children (one for JavaScript and one for TypeScript), ensure the JS tab uses the
&ext=js parameter in its SnackPlayer URL and add a TS variant that converts the
App component to TypeScript (including any props/types if needed); keep the
inner component name App and the same hitSlop usage so the example behavior is
unchanged.
In `@cndocs/shadow-props.md`:
- Around line 40-48: Remove the unary negation on shadowOffset.height and flip
the slider's min/max so the slider's positive values move the shadow downward;
specifically update both the JS and TS examples to set shadowOffset: { width:
shadowOffsetWidth, height: shadowOffsetHeight } (no leading minus) and invert
the slider configuration that produces shadowOffsetHeight (swap its min/max) so
the control is intuitive; make the change for the variables and UI controls
referenced as shadowOffsetHeight, shadowOffsetWidth, and shadowOffset in the
examples.
| #### Android(Java/Kotlin) | ||
|
|
||
| 在原生模块中,使用 `Log` 类添加可在 Logcat 中查看的日志: | ||
|
|
||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| private void log(String message) { | ||
| Log.d("YourModuleName", message); | ||
| } | ||
| ``` | ||
|
|
||
| 要在 Logcat 中查看这些日志,请使用以下命令,将 `YourModuleName` 替换为你的自定义标签: | ||
|
|
||
| ```shell | ||
| adb logcat "*:S" ReactNative:V ReactNativeJS:V YourModuleName:D | ||
| ``` | ||
|
|
||
| #### iOS(Objective-C/Swift) | ||
|
|
||
| 在原生模块中,使用 `NSLog` 添加自定义日志: | ||
|
|
||
| ```objective-c | ||
| NSLog(@"YourModuleName: %@", message); | ||
| ``` | ||
|
|
||
| 或者在 Swift 中: | ||
|
|
||
| ```swift | ||
| print("YourModuleName: \(message)") | ||
| ``` |
There was a problem hiding this comment.
Heading levels skip h3 inside the <details> block (MD001).
Lines 31 and 49 jump directly from h2 (## 查看日志) to h4, skipping h3. The markdownlint tool flags this. Downgrading to h3 keeps the hierarchy valid and fixes the warning.
🔧 Proposed fix
-#### Android(Java/Kotlin)
+### Android(Java/Kotlin)-#### iOS(Objective-C/Swift)
+### iOS(Objective-C/Swift)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| #### Android(Java/Kotlin) | |
| 在原生模块中,使用 `Log` 类添加可在 Logcat 中查看的日志: | |
| ```java | |
| import android.util.Log; | |
| private void log(String message) { | |
| Log.d("YourModuleName", message); | |
| } | |
| ``` | |
| 要在 Logcat 中查看这些日志,请使用以下命令,将 `YourModuleName` 替换为你的自定义标签: | |
| ```shell | |
| adb logcat "*:S" ReactNative:V ReactNativeJS:V YourModuleName:D | |
| ``` | |
| #### iOS(Objective-C/Swift) | |
| 在原生模块中,使用 `NSLog` 添加自定义日志: | |
| ```objective-c | |
| NSLog(@"YourModuleName: %@", message); | |
| ``` | |
| 或者在 Swift 中: | |
| ```swift | |
| print("YourModuleName: \(message)") | |
| ``` | |
| ### Android(Java/Kotlin) | |
| 在原生模块中,使用 `Log` 类添加可在 Logcat 中查看的日志: | |
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 31-31: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/debugging-native-code.md` around lines 31 - 61, The section headings
"#### Android(Java/Kotlin)" and "#### iOS(Objective-C/Swift)" under the main "##
查看日志" heading should be demoted to h3 to maintain proper heading hierarchy;
change those two "####" headings to "###" so they no longer skip h3 and the
markdownlint MD001 warning is resolved, leaving the contained code blocks and
commands unchanged.
| autoCorrect={true} | ||
| keyboardType="default" | ||
| returnKeyType="next" | ||
| onSubmitEditing={() => emailInput.current.focus()} |
There was a problem hiding this comment.
JS examples model unsafe .current access inconsistent with their TS counterparts.
The JS TextInput example calls emailInput.current.focus() (line 66) and emailInput.current.blur() (line 236) without any null guard. The corresponding TypeScript snippets (lines 160 and 333) correctly use optional chaining (?.focus() / ?.blur()). While both refs are always populated at call-time in this layout, documentation examples are read as patterns to copy — the JS versions teach an unsafe habit that directly contradicts the TS examples on the same page.
🛡️ Proposed fix — JS TextInput example (line 66)
- onSubmitEditing={() => emailInput.current.focus()}
+ onSubmitEditing={() => emailInput.current?.focus()}🛡️ Proposed fix — JS KeyboardAvoidingView example (line 236)
- emailInput.current.blur();
+ emailInput.current?.blur();Also applies to: 236-236
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/improvingux.md` at line 66, Replace the unsafe direct `.current`
accesses in the JS examples with null-safe checks: change calls like
`emailInput.current.focus()` and `emailInput.current.blur()` to optional
chaining or a guard (e.g., `emailInput.current?.focus()` /
`emailInput.current?.blur()` or `if (emailInput.current)
emailInput.current.focus()`), updating the `onSubmitEditing` handler and the
KeyboardAvoidingView/blur usage so they match the TS examples' pattern and avoid
potential null dereference.
| ## 使用 Android 水波纹效果 | ||
|
|
||
| 安卓 API 21+ 使用 material design Ripple 在用户点击屏幕上可交互区域的时候为用户提供反馈。 React Native 利用[`TouchableNativeFeedback` 组件](touchablenativefeedback.md) 实现了这个功能。 使用这个触摸效果取代 opacity 或者 highlight 通常会让您的应用程序更加切合平台。 尽管如此, 还是需要注意这个组件在 IOS 平台上 或者在 Android API 小于21下无法工作的情况,所以你需要退而求其次,在IOS上使用其他的可触控组件,可以使用诸如 [react-native-platform-touchable](https://github.com/react-community/react-native-platform-touchable) 的组件解决平台差异。 | ||
| Android API 21+ 使用 Material Design 水波纹效果,在用户触摸屏幕上的可交互区域时提供反馈。React Native 通过 [`TouchableNativeFeedback` 组件](touchablenativefeedback.md) 暴露了这一功能。使用这种触摸效果代替透明度或高亮,通常会让你的应用在平台上更加自然。不过需要注意的是,它在 iOS 或 Android API < 21 上不起作用,因此你需要在 iOS 上回退使用其他 Touchable 组件。你可以使用像 [react-native-platform-touchable](https://github.com/react-community/react-native-platform-touchable) 这样的库来处理平台差异。 |
There was a problem hiding this comment.
Stale link — react-community/react-native-platform-touchable is no longer at this URL and the library is archived.
This repository has been archived by its owner and is now read-only. The project was moved first to the react-native-community org and is now under rnc-archive. Additionally, the archived repo itself recommends using react-native-gesture-handler buttons instead. The current documentation link points to the defunct react-community org and will not resolve to an active project.
Consider either removing the reference entirely, pointing to https://github.com/rnc-archive/react-native-platform-touchable with a deprecation note, or substituting a recommendation for react-native-gesture-handler or the built-in Pressable component.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/improvingux.md` at line 493, Update the stale reference to
react-native-platform-touchable in the TouchableNativeFeedback documentation:
replace the broken react-community URL with either the archived mirror
https://github.com/rnc-archive/react-native-platform-touchable and add a short
deprecation note, or remove the link entirely and instead recommend using
react-native-gesture-handler buttons or the built-in Pressable as the modern
cross-platform alternative; ensure the paragraph mentions
TouchableNativeFeedback and the replacement options
(react-native-gesture-handler, Pressable) so readers know the recommended
fallbacks for iOS and API <21.
|
|
||
| # 了解更多 | ||
|
|
||
| [Material Design](https://material.io/) 和 [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines) 是学习移动平台设计的优秀资源。 |
There was a problem hiding this comment.
material.io link could be updated to point at Material Design 3.
Material Design is now documented at m3.material.io (Material Design 3 / Material You). While material.io still redirects, updating the link to https://m3.material.io/ would point readers to the current design system rather than relying on a redirect.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/improvingux.md` at line 596, Update the markdown link for Material
Design that currently reads "[Material Design](https://material.io/)" to point
to the Material Design 3 site by replacing the URL with
"https://m3.material.io/"; leave the link text unchanged so it becomes
"[Material Design](https://m3.material.io/)". Ensure only the URL is updated
wherever the exact markdown string "[Material Design](https://material.io/)"
appears in the document.
| 用于控制应用状态栏的组件。状态栏是屏幕顶部的区域,通常显示当前时间、Wi-Fi 和蜂窝网络信息、电池电量和/或其他状态图标。 | ||
|
|
||
| 由于`StatusBar`可以在任意视图中加载,可以放置多个且后加载的会覆盖先加载的。因此在配合导航器使用时,请务必考虑清楚`StatusBar`的放置顺序。 | ||
| ### 和导航器一起使用 |
There was a problem hiding this comment.
First body heading is h3 instead of h2 (MD001).
In Docusaurus, the title frontmatter renders as h1, so the first heading in the document body should be h2. The current h3 here jumps a level.
🔧 Proposed fix
-### 和导航器一起使用
+## 和导航器一起使用📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### 和导航器一起使用 | |
| ## 和导航器一起使用 |
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 10-10: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/statusbar.md` at line 10, The first body heading is using h3 ("###
和导航器一起使用") but must be h2 to follow Docusaurus frontmatter rules; change the
heading token from "### 和导航器一起使用" to "## 和导航器一起使用" so the body’s first heading
is h2.
| ### `networkActivityIndicatorVisible` <div className="label ios">iOS</div> | ||
|
|
||
| 指定是否显示网络活动提示符。 | ||
| 是否显示网络活动指示器。 | ||
|
|
||
| | 类型 | 必需 | 平台 | | ||
| | ---- | ---- | ---- | | ||
| | bool | 否 | iOS | | ||
| | 类型 | 默认值 | | ||
| | ------- | ------- | | ||
| | boolean | `false` | | ||
|
|
||
| --- | ||
|
|
||
| ### `showHideTransition` | ||
| ### `showHideTransition` <div className="label ios">iOS</div> | ||
|
|
||
| 通过`hidden`属性来显示或隐藏状态栏时所使用的动画效果。默认值为'fade'。 | ||
| 使用 `hidden` 属性显示和隐藏状态栏时的过渡效果。 | ||
|
|
||
| | 类型 | 必需 | 平台 | | ||
| | --------------------- | ---- | ---- | | ||
| | enum('fade', 'slide') | 否 | iOS | | ||
| | 类型 | 默认值 | | ||
| | -------------------------------------------------- | -------- | | ||
| | [StatusBarAnimation](statusbar#statusbaranimation) | `'fade'` | |
There was a problem hiding this comment.
networkActivityIndicatorVisible prop missing deprecation notice.
The setNetworkActivityIndicatorVisible() method at Line 441 is marked 🗑️ 已弃用 with a warning that iOS 13+ no longer supports the network activity indicator. The networkActivityIndicatorVisible prop controls the same feature and should carry the same deprecation warning for consistency.
Additionally, the tables for networkActivityIndicatorVisible (Line 304) and showHideTransition (Line 314) are missing the "必需" column that all other prop tables in this file include.
🔧 Proposed fix
-### `networkActivityIndicatorVisible` <div className="label ios">iOS</div>
+### 🗑️ `networkActivityIndicatorVisible` <div className="label ios">iOS</div>
+:::warning 已弃用
+iOS 13 及更高版本不再支持状态栏网络活动指示器。
+:::
+
是否显示网络活动指示器。
-| 类型 | 默认值 |
-| ------- | ------- |
-| boolean | `false` |
+| 类型 | 必需 | 默认值 |
+| ------- | ---- | ------- |
+| boolean | 否 | `false` | ### `showHideTransition` <div className="label ios">iOS</div>
...
-| 类型 | 默认值 |
-| -------------------------------------------------- | -------- |
-| [StatusBarAnimation](statusbar#statusbaranimation) | `'fade'` |
+| 类型 | 必需 | 默认值 |
+| -------------------------------------------------- | ---- | -------- |
+| [StatusBarAnimation](statusbar#statusbaranimation) | 否 | `'fade'` |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/statusbar.md` around lines 300 - 316, Add the same deprecation warning
text shown on the setNetworkActivityIndicatorVisible() method to the
networkActivityIndicatorVisible prop description (mark it as deprecated and note
iOS 13+ no longer supports the network activity indicator) so both API docs are
consistent; also update the prop tables for networkActivityIndicatorVisible and
showHideTransition to include the missing "必需" column with appropriate values
(e.g., `false` for networkActivityIndicatorVisible and the correct required
boolean/`false` for showHideTransition) following the same table structure used
elsewhere in this file so formatting matches other prop entries.
| | boolean | | ||
|
|
||
| ### `onAccessibilityAction` |
There was a problem hiding this comment.
Missing --- separator before onAccessibilityAction.
Every adjacent prop section in this file is separated by a --- horizontal rule, but aria-selected transitions directly into onAccessibilityAction without one.
📄 Proposed fix
| 类型 |
| ------- |
| boolean |
+
+---
+
### `onAccessibilityAction`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | boolean | | |
| ### `onAccessibilityAction` | |
| | boolean | | |
| --- | |
| ### `onAccessibilityAction` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/touchablewithoutfeedback.md` around lines 299 - 301, Add the missing
markdown horizontal rule separator before the `onAccessibilityAction` prop
section: locate the end of the `aria-selected` prop block and insert a `---`
divider so `aria-selected` and `onAccessibilityAction` are separated; ensure the
`onAccessibilityAction` header and its content remain unchanged after adding the
`---`.
| ### `onPress` | ||
|
|
||
| 当触摸操作结束时调用,但如果被取消了则不调用(譬如响应者被一个滚动操作取代)。 | ||
| 当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent) 形式的事件。 |
There was a problem hiding this comment.
Minor grammar: 不会调用 → 不会被调用。
"调用" here is passive (the callback is called/not called), so the passive marker "被" should be present.
📄 Proposed fix
-当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent) 形式的事件。
+当触摸释放时调用,但如果被取消则不会被调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent) 形式的事件。📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent) 形式的事件。 | |
| 当触摸释放时调用,但如果被取消则不会被调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent) 形式的事件。 |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~469-~469: 能愿动词不能成为‘把’字句、‘被’字句的谓语动词。应该是:"会被……取消"。
Context: ...tion | --- ### onPress 当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEven...
(wa3)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/touchablewithoutfeedback.md` at line 469, Fix the minor Chinese
grammar in touchablewithoutfeedback.md by changing the phrase "不会调用" to the
passive form "不会被调用" in the sentence that reads
"当触摸释放时调用,但如果被取消则不会调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent)
形式的事件。", updating only that phrase so it becomes
"当触摸释放时调用,但如果被取消则不会被调用(例如,被滚动视图抢夺了响应器锁定)。第一个函数参数是 [PressEvent](pressevent)
形式的事件。"
| ### `nativeID` | ||
|
|
||
| | 类型 | Required | | ||
| | ------ | -------- | | ||
| | string | No | | ||
| | 类型 | | ||
| | ------ | | ||
| | string | |
There was a problem hiding this comment.
nativeID prop lacks a description.
All peer props include at least a one-line explanation. nativeID is the inverse counterpart of id (the id entry already says it overrides nativeID) and should have a matching description.
📄 Proposed fix
### `nativeID`
+用于从原生代码中定位此视图。
+
| 类型 |
| ------ |
| string |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### `nativeID` | |
| | 类型 | Required | | |
| | ------ | -------- | | |
| | string | No | | |
| | 类型 | | |
| | ------ | | |
| | string | | |
| ### `nativeID` | |
| 用于从原生代码中定位此视图。 | |
| | 类型 | | |
| | ------ | | |
| | string | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cndocs/touchablewithoutfeedback.md` around lines 507 - 511, Add a one-line
description for the `nativeID` prop to match other peer props: explain that
`nativeID` is the native view identifier used for linking native UI elements
(string), and note its relationship with `id` (that `id` overrides `nativeID`
when both are provided); update the `nativeID` entry in the
TouchableWithoutFeedback docs so it mirrors the `id` explanation and clarifies
purpose and precedence.
翻译同步 PR
处理文件(10 个)
术语对齐
Summary by CodeRabbit
Documentation
New Features