I'm currently creating a timer application in react. I have a dashboard where the user can control the timer and now I want a different window where only the component rendering the time is being displayed so it can captured by recording programs. I've tried the following:
In my app.js
function MasterStopwatch(props) {
return <span>{props.time}</span>
}
export { App, MasterStopwatch };
I'm passing in the props.time in the app.js
In my index.js
import { App, MasterStopwatch } from './App';
ReactDOM.render(
<Router history={hashHistory}>
<Route path="/" component={App}/>
<Route path="/master" component={MasterStopwatch} />
</Router>
, document.getElementById('root')
);
But when I visit the master route it displays nothing and doesn't show an error in the console.
Any help would be appreciated!