logo
  • 教程列表
  • SO官方文档
  • 多个道具渲染
    • 渲染多个变量
  1. StackOverflow 文档
  2. react-native 教程
  3. 多个道具渲染
  4. 渲染多个变量

渲染多个变量

Created: November-22, 2018

为了渲染多个道具或变量,我们可以使用 `` 。

  render() {
    let firstName = 'test';
    let lastName = 'name';
    return (
      <View style={styles.container}>
        <Text>{`${firstName} ${lastName}` } </Text>
      </View>
    );
  }

输出:测试名称

  • 多个道具渲染

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明