{"id":307,"date":"2026-10-19T15:33:30","date_gmt":"2026-10-19T07:33:30","guid":{"rendered":"https:\/\/xiit.cn\/?p=307"},"modified":"2026-10-19T15:33:30","modified_gmt":"2026-10-19T07:33:30","slug":"%e5%89%8d%e7%ab%afreact-native-rn%e9%a1%b9%e7%9b%ae%e7%9b%ae%e5%bd%95%e6%9e%b6%e6%9e%84","status":"publish","type":"post","link":"https:\/\/xiit.cn\/index.php\/2026\/10\/19\/%e5%89%8d%e7%ab%afreact-native-rn%e9%a1%b9%e7%9b%ae%e7%9b%ae%e5%bd%95%e6%9e%b6%e6%9e%84\/","title":{"rendered":"\u524d\u7aefReact Native (RN)\u9879\u76ee\u76ee\u5f55\u67b6\u6784"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">my-rn-project\/<br>\u251c\u2500\u2500 <strong>tests<\/strong>\/ # \u81ea\u52a8\u5316\u6d4b\u8bd5\u6587\u4ef6 (Jest)<br>\u251c\u2500\u2500 android\/ # Android \u539f\u751f\u5de5\u7a0b\u4ee3\u7801<br>\u251c\u2500\u2500 ios\/ # iOS \u539f\u751f\u5de5\u7a0b\u4ee3\u7801<br>\u251c\u2500\u2500 assets\/ # \u5168\u5c40\u9759\u6001\u8d44\u6e90 (\u901a\u5e38\u7531 App \u6253\u5305\u6216\u539f\u751f\u5f15\u7528\u7684\u5b57\u4f53\u3001\u542f\u52a8\u9875\u7b49)<br>\u2502 \u251c\u2500\u2500 fonts\/ # \u81ea\u5b9a\u4e49\u5b57\u4f53<br>\u2502 \u2514\u2500\u2500 images\/ # \u539f\u751f\u5f15\u7528\u7684\u56fe\u7247<br>\u251c\u2500\u2500 src\/ #  \u524d\u7aef\u6838\u5fc3\u6e90\u7801\u76ee\u5f55<br>\u2502 \u251c\u2500\u2500 api\/ # \u7f51\u7edc\u8bf7\u6c42\u7edf\u4e00\u5c01\u88c5 (Axios\/Fetch \u5b9e\u4f8b\u3001\u62e6\u622a\u5668)<br>\u2502 \u251c\u2500\u2500 components\/ # \u5168\u5c40\u901a\u7528 UI \u7ec4\u4ef6 (\u539f\u5b50\u7ec4\u4ef6\uff0c\u5982 Button, Input)<br>\u2502 \u251c\u2500\u2500 constants\/ # \u5168\u5c40\u5e38\u91cf (\u5982 config, theme, theme, standard layout)<br>\u2502 \u251c\u2500\u2500 hooks\/ # \u5168\u5c40\u81ea\u5b9a\u4e49 React Hooks (\u5982 useAuth, useDebounce)<br>\u2502 \u251c\u2500\u2500 navigation\/ # \u8def\u7531\u4e0e\u5bfc\u822a\u914d\u7f6e (React Navigation)<br>\u2502 \u251c\u2500\u2500 store\/ # \u5168\u5c40\u72b6\u6001\u7ba1\u7406 (Redux Toolkit \/ Zustand \/ MobX)<br>\u2502 \u251c\u2500\u2500 types\/ # TypeScript \u7c7b\u578b\u5b9a\u4e49 (.d.ts \u6216 ts \u7c7b\u578b)<br>\u2502 \u251c\u2500\u2500 utils\/ # \u5de5\u5177\u51fd\u6570 (\u65e5\u671f\u5904\u7406\u3001\u52a0\u89e3\u5bc6\u3001\u683c\u5f0f\u5316)<br>\u2502 \u2514\u2500\u2500 features\/ # \u6838\u5fc3\u4e1a\u52a1\u6a21\u5757 (\u6309\u529f\u80fd\u62c6\u5206\uff0c\u4e2d\u578b\u9879\u76ee\u7075\u9b42\u6240\u5728)<br>\u2502 \u251c\u2500\u2500 auth\/ # \u8ba4\u8bc1\u6a21\u5757 (\u767b\u5f55\/\u6ce8\u518c\/\u5fd8\u8bb0\u5bc6\u7801)<br>\u2502 \u2502 \u251c\u2500\u2500 components\/# \u8be5\u6a21\u5757\u72ec\u6709\u7684\u7ec4\u4ef6<br>\u2502 \u2502 \u251c\u2500\u2500 hooks\/ # \u8be5\u6a21\u5757\u72ec\u6709\u7684 hooks<br>\u2502 \u2502 \u251c\u2500\u2500 screens\/ # \u8be5\u6a21\u5757\u7684\u9875\u9762 (LoginScreen.tsx)<br>\u2502 \u2502 \u2514\u2500\u2500 authSlice.ts<br>\u2502 \u251c\u2500\u2500 home\/ # \u9996\u9875\u6a21\u5757<br>\u2502 \u2514\u2500\u2500 profile\/ # \u4e2a\u4eba\u4e2d\u5fc3\u6a21\u5757<br>\u251c\u2500\u2500 .env.development # \u5f00\u53d1\u73af\u5883\u73af\u5883\u53d8\u91cf<br>\u251c\u2500\u2500 .env.production # \u751f\u4ea7\u73af\u5883\u73af\u5883\u53d8\u91cf<br>\u251c\u2500\u2500 App.tsx # \u5e94\u7528\u6839\u7ec4\u4ef6 (Provider\u3001\u8def\u7531\u5165\u53e3)<br>\u251c\u2500\u2500 index.js # App \u6ce8\u518c\u5165\u53e3\u6587\u4ef6<br>\u251c\u2500\u2500 package.json # \u4f9d\u8d56\u7ba1\u7406<br>\u2514\u2500\u2500 tsconfig.json # TypeScript \u914d\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>my-rn-project\/\u251c\u2500\u2500 tests\/ # \u81ea\u52a8\u5316\u6d4b\u8bd5\u6587\u4ef6 (Jest)\u251c\u2500\u2500 android\/ # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[33],"class_list":["post-307","post","type-post","status-publish","format-standard","hentry","category-js","tag-js"],"_links":{"self":[{"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":1,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"predecessor-version":[{"id":308,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/posts\/307\/revisions\/308"}],"wp:attachment":[{"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiit.cn\/index.php\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}