React-Native Button style not work

前端 未结 9 1077
傲寒
傲寒 2020-12-24 10:33

Import_this

import {AppRegistry, Text, View, Button, StyleSheet} from \'react-native\';

This my

9条回答
  •  时光取名叫无心
    2020-12-24 10:45

    Only learning myself, but wrapping in a View may allow you to add styles around the button.

    const Stack = StackNavigator({
      Home: {
        screen: HomeView,
        navigationOptions: {
          title: 'Home View'
        }
      },
      CoolView: {
        screen: CoolView,
        navigationOptions: ({navigation}) => ({
          title: 'Cool View',
          headerRight: (

提交回复
热议问题