Skip to content

Commit

Permalink
part 07
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed Sep 1, 2017
1 parent 64b888b commit 8714f0a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App';
import storyStore from './stores/storyStore';
import archiveStore from './stores/archiveStore';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(
<App stories={storyStore.stories} onArchive={(objectID) => { console.log(objectID); }} />,
<App
stories={storyStore.stories}
onArchive={(objectID) => archiveStore.archivedStoryIds.push(objectID)}
/>,
document.getElementById('root')
);
registerServiceWorker();
9 changes: 9 additions & 0 deletions src/stores/archiveStore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { observable } from 'mobx';

class ArchiveStore {
@observable archivedStoryIds = [];
}

const archiveStore = new ArchiveStore();

export default archiveStore;

0 comments on commit 8714f0a

Please sign in to comment.