Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const t = <SomeOtherComponent someProp="test" />;
  2. class MyComponent extends React.Component {
  3.     render() {
  4.         return t;
  5.     }
  6. }
  7. class SomeOtherComponent extends React.Component {
  8.     constructor(props) {
  9.         super(props);
  10.         console.log("NEW!!");  
  11.     }
  12.     render() {
  13.         return this.props.someProp;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement