mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-05-23 16:49:02 +08:00
Moves event normalization and the ResponderEventPlugin injection from 'View' to 'createDOMElement'. The 'react-native-web/lite' variant is removed from the performance directory as the implementation is not substantially different. Micro-optimizations to marginally narrow the performance gap to css-modules.
24 lines
908 B
JavaScript
24 lines
908 B
JavaScript
import cssModules from './implementations/css-modules';
|
|
import glamor from './implementations/glamor';
|
|
import reactNative from './implementations/react-native-web';
|
|
import styledComponents from './implementations/styled-components';
|
|
|
|
import renderDeepTree from './tests/renderDeepTree';
|
|
import renderWideTree from './tests/renderWideTree';
|
|
|
|
const tests = [
|
|
// deep tree
|
|
() => renderDeepTree('css-modules', cssModules),
|
|
() => renderDeepTree('react-native-web', reactNative),
|
|
() => renderDeepTree('styled-components', styledComponents),
|
|
() => renderDeepTree('glamor', glamor),
|
|
// wide tree
|
|
() => renderWideTree('css-modules', cssModules),
|
|
() => renderWideTree('react-native-web', reactNative),
|
|
() => renderWideTree('styled-components', styledComponents),
|
|
() => renderWideTree('glamor', glamor)
|
|
];
|
|
|
|
// run benchmarks
|
|
tests.reduce((promise, test) => promise.then(test()), Promise.resolve());
|