MineGuang.js 1.15 KB
'use strict';

import React from 'react';
import createReactClass from 'create-react-class';
import ReactNative, {
	AppRegistry,
	Platform,
	StyleSheet,
	Dimensions,
	TouchableOpacity,
	View,
} from 'react-native';

import {
	Provider,
	connect
} from 'react-redux';

import configureStore from './store/configureStore';
import {Record, List, Map} from 'immutable';

import appInitialState from './reducers/app/appInitialState';
import mineGuangInitialState from './reducers/mineGuang/mineGuangInitialState';

import MineGuangContainer from './containers/MineGuangContainer';

import {
	setPlatform,
	setHost,
	setServiceHost,
} from './reducers/app/appActions';

function getInitialState() {
	const _initState = {
		app: (new appInitialState()),
		mineGuang: (new mineGuangInitialState()),
	};
	return _initState;
}

export default function native(platform) {

	let YH_MineGuang = createReactClass({
		render() {
		  	const store = configureStore(getInitialState());

			return (
				<Provider store={store}>
					<MineGuangContainer />
				</Provider>
			);
		}
	});

	AppRegistry.registerComponent('YH_MineGuang', () => YH_MineGuang);
}

let styles = StyleSheet.create({

});