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

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

Issue 2731473002: MD Bookmarks: Implement basis for new data-binding system (Closed)
Patch Set: 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..4a51fa49b420759855a215288109bdd585831f23
--- /dev/null
+++ b/chrome/browser/resources/md_bookmarks/reducers.js
@@ -0,0 +1,28 @@
+// 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() {
+
michaelpg 2017/03/02 09:30:35 nit: remove blank line
tsergeant 2017/03/02 23:20:35 Done.
+ /**
+ * 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,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698