driver-worker
v0.7.11
Published
Worker driver for Rax
Downloads
147
Keywords
Readme
driver-worker
Worker driver for Rax.
Install
$ npm install --save driver-worker
Usage
worker.js
import createDriver from 'driver-worker';
import { render } from 'rax';
import App from './App';
render(
<App />
null,
{
driver: createDriver({ postMessage, addEventListener })
}
);
index.js
import domRenderer from 'driver-worker/lib/renderer';
import spawnWorker from 'worker-loader?inline!./worker.js';
const worker = spawnWorker();
domRenderer({ worker });