couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garrensmith <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Changes page content moved to React
Date Wed, 04 Mar 2015 14:35:26 GMT
Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/303#discussion_r25778180
  
    --- Diff: app/addons/documents/changes/components.react.jsx ---
    @@ -11,34 +11,39 @@
     // the License.
     
     define([
    +  'app',
    +  'api',
       'react',
       'addons/documents/changes/actions',
    -  'addons/documents/changes/stores'
    -], function (React, Actions, Stores) {
    +  'addons/documents/changes/stores',
    +  'addons/fauxton/components.react',
    +  'plugins/prettify'
    +], function (app, FauxtonAPI, React, Actions, Stores, Components) {
     
    +  var changesStore = Stores.changesStore;
       var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
     
     
    -  // the top-level component for the Changes Filter section. Handles hiding/showing
    -  var ChangesHeader = React.createClass({
    +  // the top-level component for the Changes Filter section. Handles hiding/showing of
the filters form
    +  var ChangesHeaderController = React.createClass({
         getInitialState: function () {
           return {
    -        showTabContent: Stores.changesHeaderStore.isTabVisible()
    +        showTabContent: changesStore.isTabVisible()
    --- End diff --
    
    This and line 37 could be made into a `getStoreState()` and then for `getInitialState`
can just return `getStoreState` and for onchange you can do `this.setState(this.getStoreState());`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message