Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7970)

Unified Diff: chrome/browser/resources/md_bookmarks/reducers.js

Issue 2731473002: MD Bookmarks: Implement basis for new data-binding system (Closed)
Patch Set: calamity@ review Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/reducers.js
diff --git a/chrome/browser/resources/md_bookmarks/reducers.js b/chrome/browser/resources/md_bookmarks/reducers.js
new file mode 100644
index 0000000000000000000000000000000000000000..c78731d26b0f72dd8f62660eb421deab6a20e4e6
--- /dev/null
+++ b/chrome/browser/resources/md_bookmarks/reducers.js
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview Module of functions which produce a new page state in response
+ * to an action. Reducers (in the same sense as Array.prototype.reduce) must be
+ * pure functions: they must not modify existing state objects, or make any API
+ * calls.
+ */
+
+cr.define('bookmarks', function() {
+ /**
+ * Root reducer for the Bookmarks page. This is called by the store in
+ * response to an action, and the return value is used to update the UI.
+ * @param {!BookmarksPageState} state
+ * @param {Action} action
+ * @return {!BookmarksPageState}
+ */
+ function reduceAction(state, action) {
+ return {};
+ }
+
+ return {
+ reduceAction: reduceAction,
+ };
+});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/reducers.html ('k') | chrome/browser/resources/md_bookmarks/store.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698