feat(App): refactor App and split it into BaseApp and App

BaseApp does all the heavy-lifting related to creating the redux store,
navigation, and so on.

App currently handles URL props and actually triggering navigation based on
them.
This commit is contained in:
Saúl Ibarra Corretgé
2018-07-11 11:42:43 +02:00
committed by Lyubo Marinov
parent 3bfab7718f
commit dc246960df
39 changed files with 461 additions and 412 deletions

View File

@@ -1,3 +1,5 @@
// @flow
import { AtlasKitThemeProvider } from '@atlaskit/theme';
import React from 'react';
@@ -14,23 +16,16 @@ import { AbstractApp } from './AbstractApp';
* @extends AbstractApp
*/
export class App extends AbstractApp {
/**
* App component's property types.
*
* @static
*/
static propTypes = AbstractApp.propTypes;
/**
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
* the top most component.
*
* @override
*/
_createElement(component, props) {
_createMainElement(component, props) {
return (
<AtlasKitThemeProvider mode = 'dark'>
{ super._createElement(component, props) }
{ super._createMainElement(component, props) }
</AtlasKitThemeProvider>
);
}