function Note({id}) { const note = use(fetchNote(id)); return ( <div> <h1>{note.title}</h1> <section>{note.body}</section> </div> ); }
use() in React
will fetch Notes
asynchronously
note is always a
fulfilled promise