feat(rnsdk) share bootsrap code with app

This commit is contained in:
Saúl Ibarra Corretgé
2023-07-31 15:39:08 +02:00
committed by Saúl Ibarra Corretgé
parent 38280c358f
commit c83c4488bf
4 changed files with 30 additions and 23 deletions

View File

@@ -1,17 +1,11 @@
// https://github.com/software-mansion/react-native-gesture-handler/issues/320#issuecomment-443815828
import 'react-native-gesture-handler';
// Apply all necessary polyfills as early as possible to make sure anything imported henceforth
// sees them.
import 'react-native-get-random-values';
import './features/mobile/polyfills';
// NB: This import must always come first.
import './bootstrap.native';
import React, { PureComponent } from 'react';
import { AppRegistry } from 'react-native';
import { App } from './features/app/components/App.native';
import { _initLogging } from './features/base/logging/functions';
import JitsiThemePaperProvider from './features/base/ui/components/JitsiThemeProvider';
/**
* React Native doesn't support specifying props to the main/root component (in
@@ -29,10 +23,7 @@ class Root extends PureComponent {
*/
render() {
return (
<JitsiThemePaperProvider>
<App
{ ...this.props } />
</JitsiThemePaperProvider>
<App { ...this.props } />
);
}
}