React-NativeReact NativeReact-Native笔记

React-Native 之 View的使用

2016-12-08  本文已影响6863人  珍此良辰

前言

JSX 和 组件 的概念


View 组件中常见的属性


View 组件使用



    render() {
    return (
      <View style={styles.container}>
          <View style={{width:300, height:100, backgroundColor:'red', borderWidth:1, borderColor:'black'}}>

          </View>
      </View>
    );
  }

View 在开发中是经常会接触到的组件,灵活运用它可以帮助我们更好地结构化代码,甚至更方便的布局

上一篇 下一篇

猜你喜欢

热点阅读