score:0

this.props.history.location.state

score:0

<Link
  to={{
    pathname: "/courses",
    state: { fromDashboard: true }
  }}
/>

score:1

render() {
  // React does *not* create a new div. It renders the children into `domNode`.
  // `domNode` is any valid DOM node, regardless of its location in the DOM.
  return ReactDOM.createPortal(
    <YourComponent prop1={value1} prop2={value2}/>,
    domNode
  );
}

Related Query

More Query from same tag