import React from 'react' import PropTypes from 'prop-types'; export class NgIf extends React.Component { constructor(props){ super(props); } render() { let clean_prop = Object.assign({}, this.props); delete clean_prop.cond; delete clean_prop.children; if(this.props.cond){ return
{this.props.children}
; }else{ return null; } } } NgIf.propTypes = { cond: PropTypes.bool.isRequired };