小编Use*_*ser的帖子

在连接上下文中找不到“商店”

import React from 'react';
import { View, TouchableOpacity, StyleSheet, Button, Text, NativeModules, Image } from 'react-native';
import { connect } from 'react-redux'
import { Icon } from 'native-base';

const ShoppingCartIcon = (props) => (
    <View>
        <View style={{
            position: 'absolute', height: 30, width: 30,
            borderRadius: 15, backgroundColor: 'rgba(95,197,123,0.8)', right: 45,
            bottom: 15, alignItems: 'center', justifyContent: 'center', zIndex: 2000
        }}>
            <Text stye={{ color: 'white' }}> {props.cartItems.length} </Text>
        </View>
        <Icon name="cart" ></Icon>
        <Button style={styles.but}
            title="Add"
            onPress={() => {
                this.props.navigation.navigate('ShopScreen');
                this.props.navigation.closeDrawer();
            }}
        />
    </View> …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs react-native redux

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

标签 统计

javascript ×1

react-native ×1

reactjs ×1

redux ×1