Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import React from "react";
  2. import NoteItem from "./NoteItem";
  3.  
  4. const NoteList = ({ notes, displayNote }) => {
  5. // console.log(props.notes[0]);
  6. // generateNoteItems = () => {
  7. // return props.notes.map((note, idx) => <NoteItem key={idx} {...note} />);
  8. // };
  9. // return <ul id="note-list">{this.generateNoteItems()}</ul>;
  10.  
  11. // const handleClick = e => {
  12. // this.props.displayNote;
  13. // };
  14.  
  15. return (
  16. <ul id="note-list">
  17. {notes.map(note => (
  18. <NoteItem note={note} displayNote={displayNote} />
  19. ))}
  20. </ul>
  21. );
  22. };
  23.  
  24. export default NoteList;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement