小编Крі*_*ріс的帖子

@react-native-community/blur 不适用于世博会?

我正在使用 Expo,我正在使用<BlurView />.. @react-native-community/blur,它引发了我的错误Invariant Violation: requireNativeComponent: "BlurView" was not found in the UIManager.。世博会不支持吗@react-native-community/blur

展会版本:40.0.0 模拟器:Android

其他注意事项:

我确实尝试过expo-blur,但它并没有像我预期的那样模糊..所以这就是我使用@react-native-community/blur.

    <ImageBackground source={background} style={styles.imageContainer}>
      <SafeAreaView style={styles.container}>
        <StatusBar backgroundColor={THEME.WHITE} barStyle='dark-content' />
        <BlurView style={styles.formContainer}>
          <View style={{ marginBottom: 15 }}>
            <Input
              leftIcon={
                <Icon
                  color={THEME.GREY_6}
                  name='email'
                  type={ICON.MaterialCommunityIcons}
                  variant={VARIANT.MEDIUM}
                />
              }
              placeholder='Email'
              onChangeText={(e) => onChangeEmail(e)}
            />
          </View>
          <View>
            <Input
              leftIcon={
                <Icon
                  color={THEME.GREY_6}
                  name='onepassword'
                  type={ICON.MaterialCommunityIcons}
                  variant={VARIANT.MEDIUM}
                />
              }
              placeholder='Password'
              onChangeText={(e) => onChangeEmail(e)}
            />
          </View>
          <View style={styles.forgotPassContainer}>
            <Text style={styles.text}>Forgot …
Run Code Online (Sandbox Code Playgroud)

react-native expo

7
推荐指数
1
解决办法
6502
查看次数

如何隐藏底部选项卡导航器中的标签反应导航v5

我试图隐藏标签。并且showLabel: false不工作。

import React, {useLayoutEffect} from 'react';
import {createStackNavigator} from '@react-navigation/stack';
import {useNavigation} from '@react-navigation/native';

import HomeTopTabNavigator from '../routes/home.top.tab';
import {NAVIGATOR} from '../constants/screen.constants';
import THEME from '../constants/theme.constants';
import Icon from '../components/atoms/Icon';

const HomeStack = createStackNavigator();

function HomeStackNavigator() {
  const navigation = useNavigation();

  useLayoutEffect(() => {
    navigation.setOptions({
      showLabel: false,
      tabBarIcon: () => (
        <Icon
          type="MaterialCommunityIcons"
          name="home"
          size={24}
          color={THEME.PRIMARY}
        />
      ),
    });
  }, [navigation]);

  return (
    <HomeStack.Navigator
      screenOptions={{headerStyle: {elevation: 0, shadowOpacity: 0}}}>
      <HomeStack.Screen
        name={NAVIGATOR.HomeTopTab}
        component={HomeTopTabNavigator}
      />
    </HomeStack.Navigator>
  );
}

export …
Run Code Online (Sandbox Code Playgroud)

react-native react-navigation-bottom-tab react-navigation-v5

6
推荐指数
1
解决办法
1万
查看次数