client/src/components/NotesList.js
author ymh <ymh.work@gmail.com>
Mon, 22 May 2017 14:34:35 +0200
changeset 1 431977d7c9a6
child 2 b52921a63e77
permissions -rw-r--r--
add first react application skeleton

import React from 'react';

import PropTypes from 'prop-types';
import Immutable from 'immutable';

import Note from './Note';

const NotesList = ({notes}) => {
  return (
    <div>
      {notes.map((note) => 
        <Note key={note.id} note={note} />  
      )}
    </div>
  );
};

NotesList.propTypes = {
  notes: PropTypes.instanceOf(Immutable.List).isRequired
};

export default NotesList;