I was wondering if it is possible in react to pass data between two React component tags
Example:
Component.js
var React = require('react');
export class MyComponent extends React.Component {
render() {
return /*some text*/;
}
}
App.js
/*rendered to page*/
<MyComponent>How do I display this text?</MyComponent>
I know I could just add this.props.text but just curious if that's an option