Files
react-native-web/performance/index.js
T
Nicolas Gallagher a2cafe56fc Add initial performance benchmarks
Simple render tree benchmarks originally developed by @lelandrichardson

Fix #306
2017-01-01 14:43:47 -08:00

12 lines
372 B
JavaScript

import deepTree from './benchmarks/deepTree';
import React from 'react';
import ReactDOM from 'react-dom';
const node = document.querySelector('.root');
Promise.resolve()
.then(deepTree({ wrap: 4, depth: 3, breadth: 10, runs: 10 }, node))
.then(deepTree({ wrap: 1, depth: 5, breadth: 3, runs: 20 }, node))
.then(() => ReactDOM.render(<div>Complete</div>, node));