Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (15 sloc) 403 Bytes
import * as React from 'react'
import { Window } from 'node-webrender'
import { render } from 'node-webrender/lib/react'
import App from './App'
const w = new Window('node-webrender', 800, 500)
let Root = App
const renderRoot = () =>
render(<Root />, w)
if ('hot' in module) {
(module as any).hot.accept('./App', () => {
Root = require('./App').default
renderRoot()
})
}
renderRoot()
You can’t perform that action at this time.