(upbeat techno music)…- [Instructor] Now to get started with using client state…we actually need to configure it.…To configure client state, we're going to be using the function…with client state which we're actually going to be…importing from the Apollo Link State package.…Now the with client state function, produces an actual link…that's used in our apollo client link configuration…to provide support for this local client state.…
Now the client state has three options that we need…to configure in order for it to work properly.…First we need the cache option.…The cache option identifies where the local client state…is actually going to be stored.…Fortunately, we can actually use this same cache object…for where we store our server data, we can use that same…cache object to actually store our local state as well.…So we don't have to go creating multiple caches in order…to actually store our local state.…
Next we need the defaults option.…The defaults option will actually specify the default…values of our client state.…
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.