content: import React, { Component } from 'react';
  import { connect } from 'react-redux';
  import NoteFolder from './note_folder';
  import { getRoot } from '../actions/index';
  import { getLoader } from '../utils/utils';
  
  class NotesList extends Component {
  
    componentWillMount(){
      this.props.getRoot()
    }
  
    render(){
      if(!this.props.rootId)
        return getLoader('Loading...');
      return <NoteFolder uid={ this.props.rootId } isRootFolder={ true } />;
    }
  }
  
  function mapStateToProps(state){
    return { rootId: state.notes.rootId };
  }
  
  export default connect(mapStateToProps, { getRoot })(NotesList);
  