Permalink
Browse files

Step 12: Update '~/main.js' to finalize the implementation of Redux.

  • Loading branch information...
embengineering committed May 22, 2016
1 parent 30aeef1 commit 0e5f1387e8fd081971f7756c892eed65b6750fed
Showing with 12 additions and 3 deletions.
  1. +12 −3 src/main.js
@@ -8,8 +8,10 @@ import './scss/main.scss';
import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import StaticMiniDashboard from './components/StaticMiniDashboard.jsx';
import {Provider} from 'react-redux';
import store from './store';
import MiniDashboard from './components/MiniDashboard.jsx';
import * as miniDashboardActions from './actions/miniDashboardActions';
// TEST DATA
const testData = {
@@ -25,6 +27,13 @@ const testData = {
};
ReactDOM.render(
<StaticMiniDashboard {...testData} />,
<Provider store={store}>
<MiniDashboard />
</Provider>,
document.getElementById('app')
);
setTimeout(() => {
store.dispatch(miniDashboardActions.displayWelcomeCard(testData.welcomeMsg));
store.dispatch(miniDashboardActions.displayCardList(testData.cards));
});

0 comments on commit 0e5f138

Please sign in to comment.