📌  相关文章
📜  动态反应原生创建视图 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:59.090000             🧑  作者: Mango

代码示例1
//you define a function to generate the view
viewGenerator(isTrue){
  if(isTrue){
    return( //you return the view you want to generate
      
          Generated text
      
    );
  }
}

render(){
  return(
    
      //then you use it inside your view like this
      {this.viewGenerator(true)}
    
  );
}