Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rax里面有没有像vue-weex中v-if这种节点控制属性? #110

Closed
Mryong opened this issue Feb 10, 2017 · 1 comment
Closed

rax里面有没有像vue-weex中v-if这种节点控制属性? #110

Mryong opened this issue Feb 10, 2017 · 1 comment

Comments

@Mryong
Copy link

Mryong commented Feb 10, 2017

rax里面有没有像vue-weex中v-if这种节点控制属性,来控制节点是否存在?

@yuanyan
Copy link
Collaborator

yuanyan commented Feb 10, 2017

v-if 在类angular体系里属于指令,不属于属性,rax与react一样没有指令的概念,要实现if的效果可以参考如下代码:

render(){
  return <div>
    {isContainer ? <div /> : <p />}
  </div>
]

@Mryong Mryong closed this as completed Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants