React this.props undefined or empty object (check if prop is empty ) admin December 25, 2022 0 Reactjs Spread the loveReact this.props undefined or empty object (check if prop is empty ) Example code : render() { let Component; if(check if props has val) { Component = <Component /> }else { Component = null } return ( <div> {Component} </div> ) } Related posts: No related posts.