xcode - How To apply css properties in react native by using refs dynamically -
here instance need login div , hide using refs how achieve ?
var text=react.createclass({ componentdidmount:function(){ console.log(this.refs.login.getdomnode()); }, render:function(){ return (<view ref="login"> <text>abc</text> <text>123</text> </view>) } })`
you this:
render: function() { if(this.props.show) { return (<view ref="login"> <text>abc</text> <text>123</text> </view>) } else { return null; } }
Comments
Post a Comment