Last active
May 11, 2017 23:01
-
-
Save shenkev/4840a299a6e5abf88cdb99dc8116d64b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Preview.js | |
let Preview = (props) => { | |
const {username, tex} = props; | |
return ( | |
<div>{username}</div> | |
<div>$${tex}$$</div> | |
) | |
} | |
Preview.componentDidMount = function() { | |
MathJax.Hub.Queue(["Typeset",MathJax.Hub]); | |
} | |
// Index.js | |
ReactDOM.render( | |
<Provider store={store}> | |
<MuiThemeProvider muiTheme={getMuiTheme()}> | |
<div style={{ display: 'flex', flexDirection:'row' }}> | |
<div> | |
<Form onSubmit={showResults} /> | |
</div> | |
<div> | |
<Preview /> | |
</div> | |
</div> | |
</MuiThemeProvider> | |
</Provider>, | |
document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment