* Copyright (c) 2025 Huawei Technologies Co., Ltd.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import {AppParamsContext} from './contexts';
import {
AnimationsExample,
CheckerboardExample,
ChessboardExample,
CursorExample,
FlatListVsScrollViewExample,
ImageGalleryExample,
LargeImageScrollExample,
StickyHeadersExample,
TesterExample,
TextScrollExample,
TogglingComponentExample,
TextTestsExample,
TransparentExample,
} from './examples';
import PerformanceMeasurement from './tests/Performance/PerformanceMeasurement';
AppRegistry.setWrapperComponentProvider(appParams => {
return ({children, ..._otherProps}) => (
<AppParamsContext.Provider value={appParams}>
{children}
</AppParamsContext.Provider>
);
});
AppRegistry.registerComponent(appName, () => App);
AppRegistry.registerComponent('tester', () => TesterExample);
AppRegistry.registerComponent(
'performance_measurement',
() => PerformanceMeasurement,
);
AppRegistry.registerComponent('animations', () => AnimationsExample);
AppRegistry.registerComponent('text_tests', () => TextTestsExample);
AppRegistry.registerComponent('checkerboard', () => CheckerboardExample);
AppRegistry.registerComponent('chessboard', () => ChessboardExample);
AppRegistry.registerComponent('cursor', () => CursorExample);
AppRegistry.registerComponent('image_gallery', () => ImageGalleryExample);
AppRegistry.registerComponent(
'large_image_scroll',
() => LargeImageScrollExample,
);
AppRegistry.registerComponent('text_scroll', () => TextScrollExample);
AppRegistry.registerComponent('flat_list', () => FlatListVsScrollViewExample);
AppRegistry.registerComponent('toggling', () => TogglingComponentExample);
AppRegistry.registerComponent('sticky_headers', () => StickyHeadersExample);
AppRegistry.registerComponent('transparent', () => TransparentExample);