Closed notelyfe closed 2 years ago
import React from 'react' import {useContext} from 'react' import noteContext from '../Components/context/NoteState' // import NoteItem from './NoteItem'
const Notes = () => {
const context = useContext(noteContext); console.log(context)
//Problem is here in Context. I am getting the output for noteContext but //unable to get the output for context when doing console.log()
// eslint-disable-next-line const { notes, setNotes } = context; return ( <div> <h1>Your Notes</h1> {notes.map((note) => { // return <NoteItem note={note}/>; return note.title; })} </div> )
} export default Notes
issue resolved
import React from 'react' import {useContext} from 'react' import noteContext from '../Components/context/NoteState' // import NoteItem from './NoteItem'
const Notes = () => {
//Problem is here in Context. I am getting the output for noteContext but //unable to get the output for context when doing console.log()
} export default Notes