Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 952 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 952 Bytes

rn-visible-view

为 React Native 提供条件渲染功能的组件

安装

$ npm install rn-visible-view --save

Useage

visible = true visible = false
不可见 可见

Example

export default class demo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>

        <VisibleView visible={true}>
          <Text style={styles.instructions}>
            To get started, edit index.ios.js
          </Text>
          <Text style={styles.instructions}>
            Press Cmd+R to reload,{'\n'}
            Cmd+D or shake for dev menu
          </Text>
        </VisibleView>
      </View>
    );
  }
}