(funky electronic music)…(rocket blasting)…- [Instructor] In addition to actually doing…mutation queries, we also have to know…how to read and write to and from the cache.…Now, when you actually do the mutation query itself,…you saw that we actually did do direct cache read/writes…as part of actually fulfilling the actual query.…But we can actually skip the entire mutation query process…and actually just get access to the client,…which is really getting access to the cache,…and being able to do our queries directly from there…without even having to do the whole mutation query process.…
Now, in order to get access to the client,…we can use a component called ApolloConsumer.…ApolloConsumer actually follows the same…provider/consumer pattern that React now recommends…for accessing context in modern React applications.…So using ApolloConsumer, we pass it a render prop,…we pass it a function, that function is invoked,…and the client is passed in, we are then free…to do various client-side operations.…For example, here we're going to wire…
Skill Level Advanced
GraphQL Essential Training (2018)with Emmanuel Henri1h 54m Intermediate
React.js Essential Training (2018)with Eve Porcello1h 25m Intermediate
1. Apollo Client State with React
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.