<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[chenbin___的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/chenbin___</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; chenbin___]]></copyright><item><title><![CDATA[鸿蒙RN position: ‘absolute‘ 和 zIndex 的兼容性问题（转自千问）]]></title><link>https://blog.csdn.net/chenbin___/article/details/160244079</link><guid>https://blog.csdn.net/chenbin___/article/details/160244079</guid><author>chenbin___</author><pubDate>Fri, 17 Apr 2026 11:12:20 +0800</pubDate><description><![CDATA[这主要是因为 RN 的鸿蒙端实现（通常指 react-native-harmony 或 @ohos/rn-ohos）在底层渲染机制上与 Android/iOS 存在显著差异。如果不做补偿，绝对定位元素会发生肉眼可见的偏移。在标准 RN 中，zIndex 仅控制同级元素的堆叠，但在鸿蒙的某些实现中，它的行为更像 Web 的 z-index，会穿透嵌套层级。在 Android/iOS 上，我们习惯使用逻辑像素，但在鸿蒙设备（尤其是 Hi3861 等开发板或高 DPI 设备）上，底层坐标系可能基于物理像素。]]></description><category></category></item><item><title><![CDATA[鸿蒙（HarmonyOS）支持 useNativeDriver的详细说明（转自千问）]]></title><link>https://blog.csdn.net/chenbin___/article/details/160226553</link><guid>https://blog.csdn.net/chenbin___/article/details/160226553</guid><author>chenbin___</author><pubDate>Thu, 16 Apr 2026 20:30:05 +0800</pubDate><description><![CDATA[默认开启，按需关闭：对于位移、缩放、旋转，必须开启，否则在鸿蒙低端设备上会出现明显掉帧。透明度单独处理：涉及opacity的动画，请直接设置。组合动画注意：如果你在一个或中同时使用了位移和透明度，只要其中包含不支持原生驱动的属性，整个动画配置通常建议设为false，或者将动画拆分为两组分别执行。]]></description><category></category></item><item><title><![CDATA[检查hooks依赖的工具（转自千问）]]></title><link>https://blog.csdn.net/chenbin___/article/details/160226032</link><guid>https://blog.csdn.net/chenbin___/article/details/160226032</guid><author>chenbin___</author><pubDate>Thu, 16 Apr 2026 19:55:27 +0800</pubDate><description><![CDATA[你提到的这个“检查依赖是否正确”的工具，通常指的不是一个独立的第三方库，而是 React 官方推荐并内置在 ESLint 中的插件规则。它就是 eslint-plugin-react-hooks。这个插件是 React 开发中的标准配置，它会在你写代码时进行静态分析，自动检查useEffectuseMemo等 Hooks 的依赖数组是否完整，防止因遗漏依赖而产生的闭包陷阱和 Bug。]]></description><category></category></item><item><title><![CDATA[RN使用，鸿蒙与安卓不兼容的代码合集（求大佬留言补充，扩散）]]></title><link>https://blog.csdn.net/chenbin___/article/details/160122359</link><guid>https://blog.csdn.net/chenbin___/article/details/160122359</guid><author>chenbin___</author><pubDate>Mon, 13 Apr 2026 21:18:03 +0800</pubDate><description><![CDATA[1、鸿蒙端的 FastImage 在 resizeMode='contain' 下，图片内容的对齐行为和 iOS/Android 不一致 — 鸿蒙默认不会将 contain 后的图片内容居中在容器内。修复方式是把尺寸和 margin 提到外层 TouchableOpacity 上，并加上 justifyContent: 'center' 和 alignItems: 'center'，让 FastImage 在容器内居中显示。]]></description><category></category></item><item><title><![CDATA[在鸿蒙手机上，measure 和 measureInWindow 返回的 y / pageY 在滑动组件后值不变问题]]></title><link>https://blog.csdn.net/chenbin___/article/details/159955512</link><guid>https://blog.csdn.net/chenbin___/article/details/159955512</guid><author>chenbin___</author><pubDate>Wed, 08 Apr 2026 13:46:55 +0800</pubDate><description><![CDATA[因为 List 容器本身不在滚动内容里（它是滚动容器），所以它的 measureInWindow 返回值即使在鸿蒙上也是相对稳定的，再配合手动减去 rightScrollOffsetRef.current 就能得到正确的屏幕坐标。在鸿蒙手机上，measure 和 measureInWindow 返回的 y / pageY 在滑动组件后值不变，是因为这两个 API 在鸿蒙的 RNOH Fabric 渲染器下，返回的是组件相对于其父容器（或布局树）的静态布局坐标，而不是相对于屏幕视口的实时坐标。]]></description><category></category></item><item><title><![CDATA[RN优化加载速度思路，与实践记录（理论转自千问，实践源于自己的项目）]]></title><link>https://blog.csdn.net/chenbin___/article/details/158661305</link><guid>https://blog.csdn.net/chenbin___/article/details/158661305</guid><author>chenbin___</author><pubDate>Wed, 04 Mar 2026 20:03:10 +0800</pubDate><description><![CDATA[表格优先级优化项🔴 高启用 Hermes、首屏最小化、图片 WebP、Splash 优化🟠 中代码分割、延迟初始化、列表虚拟滚动、移除无用依赖🟢 低字体子集、RAM Bundle（已过时）、Bitcode💡记住不要过早优化！先用工具测量真实瓶颈，再针对性解决。通过以上策略，多数 RN 应用可将冷启动时间从3–5秒优化至1–2秒内。如需具体场景（如大型电商 App、含 WebView 的混合应用）的深度优化方案，欢迎补充细节！]]></description><category></category></item><item><title><![CDATA[如何避免React Native 跨项目模块混淆问题]]></title><link>https://blog.csdn.net/chenbin___/article/details/157975698</link><guid>https://blog.csdn.net/chenbin___/article/details/157975698</guid><author>chenbin___</author><pubDate>Wed, 11 Feb 2026 17:13:10 +0800</pubDate><description><![CDATA[这次日志已经把根因暴露得很清楚：orderDetail 业务包里 require('./App') 仍然命中了A项目 App 模块（__MODULE_IDENTIFIER__ = 20260210_APage_DETAIL），所以不是加载顺序问题本身，而是模块命名/ID 冲突。如果你愿意，我下一步可以顺手把 App.tsx 改成只做转发（export { default } from './OrderWithApp'），彻底统一入口，后续更不容易回归。1) 清 Metro 缓存并重启。]]></description><category></category></item><item><title><![CDATA[Metro配置端口]]></title><link>https://blog.csdn.net/chenbin___/article/details/156941707</link><guid>https://blog.csdn.net/chenbin___/article/details/156941707</guid><author>chenbin___</author><pubDate>Wed, 14 Jan 2026 11:15:07 +0800</pubDate><description><![CDATA[表格场景操作临时换端口固化端口修改的start脚本Android 连接开发者菜单 → 设置 Debug Server 为IP:端口iOS 连接通常自动，必要时手动配置 Bundler🌐注意：端口仅影响开发调试阶段，不影响生产构建（release 包不依赖 Metro）。]]></description><category></category></item><item><title><![CDATA[JavaScript 中!!、?? 和 || 使用介绍]]></title><link>https://blog.csdn.net/chenbin___/article/details/156394078</link><guid>https://blog.csdn.net/chenbin___/article/details/156394078</guid><author>chenbin___</author><pubDate>Mon, 29 Dec 2025 17:44:19 +0800</pubDate><description><![CDATA[表达式判断条件返回值示例`ab`a??b如果a是null或undefined返回b!!a将a转为布尔值true或false!!x→“x 是真还是假？a || b→“a 有没有值？没有就用 b”（把0""当“没有”）a??b→“a 是 null/undefined 吗？是就用 b”（更精准的默认值）📌现代 JS 开发中，优先使用??设置默认值，避免||的陷阱！??自ES2020起支持，所有现代浏览器和 Node.js 14+ 均可用。]]></description><category></category></item><item><title><![CDATA[Warning: Cannot update during an existing state transition (such as within `render`). Render methods]]></title><link>https://blog.csdn.net/chenbin___/article/details/155244160</link><guid>https://blog.csdn.net/chenbin___/article/details/155244160</guid><author>chenbin___</author><pubDate>Tue, 25 Nov 2025 21:00:13 +0800</pubDate><description><![CDATA[jsx编辑// ❌ 如果 store 是全局 Redux store// ❌ 在 render 中调用，触发 dispatch✅修复将副作用移到useEffect或使用+ 事件触发jsx编辑// 安全：在 effect 中调用// 或通过按钮触发地方能否更新状态？替代方案函数组件顶层（render 主体）❌ 绝对禁止→ 移入useEffectJSX 表达式{...}中❌ 禁止→ 改为变量或函数调用（但函数不能含 setState）useEffect。]]></description><category></category></item><item><title><![CDATA[TypeError: Proxy handler is null 错误的原因和修复方法]]></title><link>https://blog.csdn.net/chenbin___/article/details/154991018</link><guid>https://blog.csdn.net/chenbin___/article/details/154991018</guid><author>chenbin___</author><pubDate>Tue, 18 Nov 2025 15:23:13 +0800</pubDate><description><![CDATA[TypeError: Proxy handler is null 错误已经完全修复！]]></description><category></category></item><item><title><![CDATA[Omit＜＞的用法]]></title><link>https://blog.csdn.net/chenbin___/article/details/154449832</link><guid>https://blog.csdn.net/chenbin___/article/details/154449832</guid><author>chenbin___</author><pubDate>Wed, 05 Nov 2025 17:54:13 +0800</pubDate><description><![CDATA[的自定义选择器组件，通过这种方式可以更好地控制组件的接口和行为。是一个回调函数，当用户选择某个选项时触发，接收选中的值。这个类型定义本身是正确的，但要确保它能正常工作，关键在于。类型的数组，通常用于定义多列选择器的每一列数据。这个类型定义通常用于封装一个更高级的、基于。这部分表示在剔除上述属性后，再“添加”上。这几个类型是否正确定义并被正确引入。这两个新的必需属性。]]></description><category></category></item><item><title><![CDATA[react native中 createAsyncThunk 的详细说明，及用法示例(转自通义千问)]]></title><link>https://blog.csdn.net/chenbin___/article/details/154240408</link><guid>https://blog.csdn.net/chenbin___/article/details/154240408</guid><author>chenbin___</author><pubDate>Sat, 01 Nov 2025 14:36:00 +0800</pubDate><description><![CDATA[是 Redux Toolkit 提供的一个核心工具，专门用于在 React Native（或 React）应用中处理异步操作。它能自动为您生成处理异步生命周期（pending, fulfilled, rejected）的 action，并将这些状态与您的 Redux store 紧密集成，从而极大地简化了异步逻辑的编写。将异步请求的逻辑（如网络请求）与状态更新逻辑（如设置 loading 状态）分离开，使代码更清晰。：当异步操作成功完成时触发，并携带返回的数据。：当异步操作失败时触发，并携带错误信息。]]></description><category></category></item><item><title><![CDATA[本地调试 React Native (RN) 组件库代码方式（方式二验证成功）]]></title><link>https://blog.csdn.net/chenbin___/article/details/153417088</link><guid>https://blog.csdn.net/chenbin___/article/details/153417088</guid><author>chenbin___</author><pubDate>Thu, 16 Oct 2025 20:13:34 +0800</pubDate><description><![CDATA[本地调试 React Native (RN) 组件库代码]]></description><category></category></item><item><title><![CDATA[鸿蒙键盘遮挡react native内容尝试]]></title><link>https://blog.csdn.net/chenbin___/article/details/152270735</link><guid>https://blog.csdn.net/chenbin___/article/details/152270735</guid><author>chenbin___</author><pubDate>Mon, 29 Sep 2025 15:26:05 +0800</pubDate><description><![CDATA['padding' : 'position'} // iOS 用 padding，Android 用 position。60 : 0} // iOS 中补偿导航栏高度。onPress={() => console.log('提交内容:', text)}placeholder="请输入内容"title="提交"]]></description><category></category></item><item><title><![CDATA[react native PanResponder拖拽过程中修改状态坐标值重置问题]]></title><link>https://blog.csdn.net/chenbin___/article/details/149245905</link><guid>https://blog.csdn.net/chenbin___/article/details/149245905</guid><author>chenbin___</author><pubDate>Thu, 10 Jul 2025 11:31:40 +0800</pubDate><description><![CDATA[修改状态时，组件状态会重置，使用useRef跨渲染周期存储组件状态。]]></description><category></category></item><item><title><![CDATA[useRef跨渲染周期存储]]></title><link>https://blog.csdn.net/chenbin___/article/details/149245668</link><guid>https://blog.csdn.net/chenbin___/article/details/149245668</guid><author>chenbin___</author><pubDate>Thu, 10 Jul 2025 11:23:46 +0800</pubDate><description><![CDATA[返回的 ref 对象在组件生命周期内保持不变，修改。属性不会触发重新渲染‌。]]></description><category></category></item><item><title><![CDATA[Web性能测试常用指标（转自百度AI）]]></title><link>https://blog.csdn.net/chenbin___/article/details/149051966</link><guid>https://blog.csdn.net/chenbin___/article/details/149051966</guid><author>chenbin___</author><pubDate>Tue, 01 Jul 2025 17:54:17 +0800</pubDate><description><![CDATA[Web性能测试常用指标]]></description><category></category></item><item><title><![CDATA[Error: Text strings must be rendered within a ＜Text＞ component.]]></title><link>https://blog.csdn.net/chenbin___/article/details/148086130</link><guid>https://blog.csdn.net/chenbin___/article/details/148086130</guid><author>chenbin___</author><pubDate>Tue, 20 May 2025 13:38:14 +0800</pubDate><description><![CDATA[RN默认加载组件时，数据可能初始化有问题，导致组件返回空字符串，也会报这个错误。解决方法：检查报错的组件返回值是否正确。返回字符串是错误的。]]></description><category></category></item><item><title><![CDATA[react native text 显示 三行 超出部分 中间使用省略号]]></title><link>https://blog.csdn.net/chenbin___/article/details/147987693</link><guid>https://blog.csdn.net/chenbin___/article/details/147987693</guid><author>chenbin___</author><pubDate>Thu, 15 May 2025 17:13:23 +0800</pubDate><description><![CDATA[(内容来自百度AI问答)在 React Native 中，要实现 ‌。]]></description><category></category></item></channel></rss>