You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working with webpack HMR proxied through browsersync and the following config, I get the right formatting, however as I change the files, I require a full page refresh to get the equations..
importReactfrom'react';import{render}from'react-dom';importReactMarkdownfrom'react-markdown';importmditfrom'markdown-it';constsingleton=(creator)=>{letobj;return()=>obj||(obj=creator());};constmd=singleton(()=>mdit({html: true,linkify: true}).use(require('markdown-it-mathjax')()));constinput='# Math Rulez! \n $$\\sqrt{3x-1}+(1+x)^2 \\frac{23}{3}$$';varrs=md().render(input);functioncreateMarkup(){return{__html: rs};}classAppextendsReact.Component{render(){return<divdangerouslySetInnerHTML={createMarkup()}/>;}}render(<App/>,document.getElementById('react'));if(module.hot){module.hot.accept();}
Is this normal behavior?
The text was updated successfully, but these errors were encountered:
Working with webpack HMR proxied through browsersync and the following config, I get the right formatting, however as I change the files, I require a full page refresh to get the equations..
Is this normal behavior?
The text was updated successfully, but these errors were encountered: