Skip to content

Commit 59ac052

Browse files
authored
Update README.md
1 parent 8b571dd commit 59ac052

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,40 @@ open android studio, open project directory, open AVD and start the emulator and
6060
1. From ios emulator: options+D , remote debug , a chrome window will be opened and then go to inspect.
6161
2. new terminal in project folder, `> react-devtools` . , if not working, install it: `> npm install -g react-devtools`
6262

63+
**Basic Application with Navigation**
64+
*App.js*
65+
`import React, { Component } from 'react';
66+
import { Provider } from 'react-redux';
67+
import firebase from 'firebase';
68+
import { createStore, applyMiddleware } from 'redux';
69+
import ReduxThunk from 'redux-thunk';
70+
import reducers from './reducers';
71+
import Router from './Router';
72+
73+
class App extends Component {
74+
componentWillMount() {
75+
const config = {
76+
apiKey: 'AIzaSyDar20iembX_H3loaJ9m-Lw2_nJ6poffFU',
77+
authDomain: 'manager-2b6e5.firebaseapp.com',
78+
databaseURL: 'https://manager-2b6e5.firebaseio.com',
79+
projectId: 'manager-2b6e5',
80+
storageBucket: 'manager-2b6e5.appspot.com',
81+
messagingSenderId: '1034384984308'
82+
};
83+
84+
firebase.initializeApp(config);
85+
}
86+
87+
render() {
88+
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
89+
90+
return (
91+
<Provider store={store}>
92+
<Router />
93+
</Provider>
94+
);
95+
}
96+
}
97+
98+
export default App;`
6399

0 commit comments

Comments
 (0)