You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native Material组件库中FAB无法正常工作的问题求助

使用react-native-material的<FAB/>组件时遇到问题

我多方查找解决方案仍无法解决,在实现react-native-material中的<FAB/>组件时出现异常。
注:未使用React Native Expo。

我的代码如下:

import React from "react";
import { Stack, FAB } from "@react-native-material/core";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";

const MyFAB = () => (
    <Stack fill center>
        <FAB icon={props => <Icon name="star" {...props} />} color="primary" />
    </Stack>
);

export default MyFAB;

内容的提问来源于stack exchange,提问作者Franjo Erić

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.26 08:45:39