📅  最后修改于: 2022-03-11 15:01:59.090000             🧑  作者: Mango
//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)}
);
}