Skip to content

Instantly share code, notes, and snippets.

@shenkev
Last active May 11, 2017 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shenkev/4840a299a6e5abf88cdb99dc8116d64b to your computer and use it in GitHub Desktop.
Save shenkev/4840a299a6e5abf88cdb99dc8116d64b to your computer and use it in GitHub Desktop.
// 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