Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const t = <SomeOtherComponent someProp="test" />;
- class MyComponent extends React.Component {
- render() {
- return t;
- }
- }
- // Assume SomeOtherComponent is in a different file.
- class SomeOtherComponent extends React.Component {
- constructor(props) {
- super(props);
- console.log("NEW!!");
- }
- render() {
- return this.props.someProp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement