View difference between Paste ID: FcbSS0wX and pmvuwq2j
SHOW: | | - or go back to the newest paste.
1
const t = <SomeOtherComponent someProp="test" />;
2
class MyComponent extends React.Component {
3
	render() {
4
		return t;
5
	}
6
}
7
// Assume SomeOtherComponent is in a different file.
8
class SomeOtherComponent extends React.Component {
9
	constructor(props) {
10
		super(props);
11
		console.log("NEW!!");	
12
	}
13
	render() {
14
		return this.props.someProp;
15
	}
16
}