Fork me on github
摘要: expo 官网 https://expo.dev/ https://github.com/expo/expo 用于简便移动端开发 快速创建项目 npx create-expo-app my-app . ├── App.js ├── app.json ├── assets ├── babel.conf 阅读全文
posted @ 2023-12-17 05:04 zjy4fun 阅读(73) 评论(0) 推荐(0) 编辑
摘要: UI Thread 负责用户界面的主要线程,用于处理用户界面的渲染、交互和更新。 如果在 UI 线程上执行耗时的操作,可能会导致界面卡顿,用户体验下降。 Main Thread 应用程序的主要执行线程,负责处理应用程序的主要逻辑、启动和管理应用。 在 React Native 中,UI 线程和主线程 阅读全文
posted @ 2023-12-17 04:57 zjy4fun 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 用于下拉刷新,example => https://github.com/zjy4fun/rn-FlatList-refreshControl import React, {useEffect, useState} from 'react'; import {FlatList, RefreshCon 阅读全文
posted @ 2023-12-17 04:45 zjy4fun 阅读(30) 评论(0) 推荐(0) 编辑
摘要: View 的布局发生改变的时候会触发 onLayout 函数,可以在布局发生变化的时候执行一些自定义操作,或者动态调整 UI 元素的样式和布局。 import React, { Component } from 'react'; import { View, Text } from 'react-n 阅读全文
posted @ 2023-12-17 04:15 zjy4fun 阅读(110) 评论(0) 推荐(0) 编辑