diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-19 21:29:37 +0400 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-19 21:29:37 +0400 |
| commit | 03dd13720c438121d0d22e0fd22ff4f16b1e0d64 (patch) | |
| tree | a8c1ad678ad5f446c58092d1d2691bd437a8046b /src | |
| parent | Add redux/redux-persist and option reducer (diff) | |
| download | githunt-03dd13720c438121d0d22e0fd22ff4f16b1e0d64.tar.gz | |
Separate loading component
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 3 | ||||
| -rw-r--r-- | src/components/loading/index.js | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -2,6 +2,7 @@ import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { PersistGate } from 'redux-persist/lib/integration/react'; +import Loading from './components/loading'; import { persist, store } from './store'; import AppRoutes from './router'; @@ -9,7 +10,7 @@ class App extends Component { render() { return ( <Provider store={ store }> - <PersistGate loading={ () => '<h1>Loading..</h1>' } persistor={ persist }> + <PersistGate loading={ <Loading/> } persistor={ persist }> <AppRoutes/> </PersistGate> </Provider> diff --git a/src/components/loading/index.js b/src/components/loading/index.js new file mode 100644 index 0000000..1c81869 --- /dev/null +++ b/src/components/loading/index.js @@ -0,0 +1,5 @@ +import React from 'react'; + +export default () => ( + <h1>Loading</h1> +); |
