Expo是一个开源和免费的平台,它允许Web开发人员通过JavaScript编写一次,构建真正适用于iOS和Android的本机应用程序。在有关开发Expo项目和使用XDE和exp等Expo开发工具的问题上使用Expo标签。
没有初始化的paymentConfiguration。致电PaymentConfiguration.init()
目前,我正在尝试在React Native中实现带有订阅付款的条纹。我使用 @Stripe/Stripe-react-Reaction-native库。我做了创建客户和订阅的后端。 BAC ...
我有一个以下启动路由器文件夹结构 - /(TABS) -_layout.tsx - 家 -Messages.tsx -QR.TSX -Thractions.tsx - /轮廓 -_layout.tsx - 帐户...
反应本机博览会视频视图没有旋转视频。 我想将React Native视频视图旋转到90度,我只看到视频控制器正在旋转,但视频仍在tha中...
ExpoEnv变量在CI/CI中被缓存,因为V52 Update
我们将自动使用GitHub Action自托管跑步者编译器,其配置看起来像这样: 名称:构建 工作: Deploy-OIS: 跑步:[自我托管,macos] env: ...
However this solution works only on the second time the app is launched, and it does not work the first time the app is launched (which is leaving quite a bad impression).. I read solutions to use an npm package called
expo自定义模块 我正在尝试在我的React Native应用程序中创建一个自定义模块,并且我正在使用Expo来创建一个自定义模块。当我遵循EXPO指令时,我最终在路径“ Pods/
提前感谢您的任何帮助!
反应本机博览会视频视图没有旋转视频。 我想将React Native视频视图旋转到90度,我只看到视频控制器正在旋转,但视频仍在tha中...
import React, {useState, useEffect, useCallback, memo} from "react"; import { View, Text, StyleSheet, SafeAreaView, Image, StatusBar, TouchableOpacity, ScrollView, } from "react-native"; import Colors from "@/constants/Colors"; import {responsiveFontSize} from "@/utils/Responsive"; import {useRouter} from "expo-router"; import BannerSlider from "@/components/home/BannerSlider"; import BannerSkeleton from "@/components/skeleton/home/bannerSkeleton"; import CategorySkeleton from "@/components/skeleton/home/categorySkeleton"; import Sidebar from "@/components/Sidebar"; import {MenuIcon} from "@/assets/icons/index"; import {useAuth} from "@/context/AuthContext"; import {fetchAllBanners, fetchCategoryList} from "@/lib/api"; interface Category { categoryId: string; name: string; image?: string; parentCategoryId: string | null; } interface Banner { id: string; image: string; } const CategoryItem: React.FC<{ item: Category; onPress: (categoryId: string) => void; }> = memo(({item, onPress}) => { return ( <TouchableOpacity activeOpacity={1} onPress={() => onPress(item.categoryId)} > <View style={{ width: responsiveFontSize(28), height: responsiveFontSize(34), }} > <View style={styles.categoryItem}> {item.image ? ( <Image source={{uri: item.image}} style={styles.categoryImage} resizeMode="contain" /> ) : ( <View style={styles.categoryImagePlaceholder} /> )} </View> <Text style={styles.categoryTitle}>{item.name}</Text> </View> </TouchableOpacity> ); }); const HomeUserScreen: React.FC = () => { const router = useRouter(); const {userRole} = useAuth(); const [isSidebarOpen, setIsSidebarOpen] = useState<boolean>(false); const [allBanners, setAllBanners] = useState<Banner[]>([]); const [isFetchingBanners, setIsFetchingBanners] = useState<boolean>(false); const [isFetchingCategories, setIsFetchingCategories] = useState<boolean>(false); const [categories, setCategories] = useState<Category[]>([]); useEffect(() => { const fetchBanners = async () => { setIsFetchingBanners(true); try { const bannersResponse = await fetchAllBanners(); setAllBanners(bannersResponse.data); } catch (error) { console.error("Error fetching banners:", error); } finally { setIsFetchingBanners(false); } }; fetchBanners(); }, []); useEffect(() => { const fetchCategories = async () => { setIsFetchingCategories(true); try { const categoriesResponse = await fetchCategoryList(); setCategories(categoriesResponse.data); categoriesResponse.data.forEach((category: Category) => { if (category.image) { Image.prefetch(category.image); } }); } catch (error) { console.error("Error fetching categories:", error); } finally { setIsFetchingCategories(false); } }; fetchCategories(); }, []); const navigateToProduct = useCallback( (categoryId: string) => { router.push({pathname: "/product/[id]", params: {id: categoryId}}); }, [router] ); return ( <SafeAreaView style={styles.safeArea}> <StatusBar barStyle="light-content" backgroundColor={Colors.primary} /> <Sidebar isOpen={isSidebarOpen} onClose={() => setIsSidebarOpen(false)} /> <View style={styles.header}> <TouchableOpacity onPress={() => setIsSidebarOpen(true)} style={styles.menuButton} > <MenuIcon /> </TouchableOpacity> <Text style={styles.headerTitle}>خانه</Text> </View> <> {isFetchingBanners ? ( <BannerSkeleton /> ) : ( <BannerSlider data={allBanners} /> )} {isFetchingCategories ? ( <CategorySkeleton /> ) : ( <ScrollView style={styles.pageContainer} showsVerticalScrollIndicator={false} > {categories .filter((category) => category.parentCategoryId === null) .map((category) => ( <View key={category.categoryId} style={styles.categorySection}> <Text style={styles.categorySectionTitle}> {category.name} </Text> <ScrollView horizontal={true} showsHorizontalScrollIndicator={false} contentContainerStyle={styles.horizontalScroll} showsVerticalScrollIndicator={false} > {categories .filter( (subcategory) => subcategory.parentCategoryId === category.categoryId ) .map((subcategory) => ( <CategoryItem key={subcategory.categoryId} item={subcategory} onPress={navigateToProduct} /> ))} </ScrollView> </View> ))} </ScrollView> )} </> </SafeAreaView> ); };
如何在Expo中的一个上传按钮中实现图像和PDF选择器? 我正在使用Expo构建一个移动应用。谁能知道启用PDF&i ...
您可以使用Expo Document Picker选择多种文件类型和图像如下:
I创建了一个带有Expo的React Native应用程序。但是,当我使用Expo Start运行它时,我将获得一个完全白色的屏幕,没有其他任何显示。 截屏: 代码 : 从'expo-status-ba ... import {statusbar} ...
(Nobridge)错误警告:必须在<Text>组件中渲染文本字符串 我确保了我的所有文本字符串都包裹在组件中,我还证实了我的进口是正确的。我可能会缺少某些东西,还是另一个常见的错误可能...
import React from 'react' import { Text } from "@/components/ui/text" import { VStack } from "@/components/ui/vstack" import { Input, InputField, InputSlot, InputIcon, EyeOffIcon } from "@/components/ui/input" import { Icon, AlertCircleIcon } from "@/components/ui/icon" import { Heading } from "@/components/ui/heading" import { Button, ButtonText, ButtonSpinner, ButtonIcon, ButtonGroup, } from "@/components/ui/button" import { FormControl, FormControlError, FormControlErrorText, FormControlErrorIcon, FormControlLabel, FormControlLabelText, FormControlLabelAstrick, FormControlHelper, FormControlHelperText } from '@/components/ui/form-control' function LoginScreen() { const [showPassword, setShowPassword] = React.useState(false); const handleState = () => { setShowPassword((showState) => { return !showState; }); }; return ( <FormControl className='p-4 border rounded-lg border-outline-300' > <VStack space='xl'> <Heading className='text-typography-900 leading-3'> <Text>Login</Text> </Heading> <VStack space='xs'> <Text className='text-typography-500 leading-1'> Email </Text> <Input> <InputField type="text" /> </Input> </VStack> <VStack space='xs'> <Text className='text-typography-500 leading-1'> Password </Text> <Input className='text-center'> <InputField type={showPassword ? 'text' : 'password'} /> <InputSlot className='pr-3' onPress={handleState}> <InputIcon as={showPassword ? EyeIcon : EyeOffIcon} className='text-darkBlue-500' /> </InputSlot> </Input> </VStack> <Button className='ml-auto' onPress={()=>{ setShowModal(false); }} > <ButtonText className='text-typography-0'> <Text>Save</Text> </ButtonText> </Button> </VStack> </FormControl> ) } export default LoginScreen // Export the component
Expo开发构建:“由于devlaunchermanifestparser.kt
问题 我正在尝试在我的开发构建中预览更新(通过EAS更新),但是我一直在错误地说: “在加载项目时存在问题。无法打开应用程序。” S ...
我遇到了这个错误,我在Google Play Console上上传了我的应用程序ABB文件
当我将应用程序ABB文件上传到Google Play Play Console时,我遇到了此错误 我尝试插入一个新的键...