- [Instructor] My next step is I actually want to move…my widgetInserted and DeletedSubscriptions actually…out to their own components as well.…So here, I'm going to create a new file,…which I'm going to call WidgetInsertedSubscription.js.…So there's my WidgetInsertedSubscription.…And what I want to do is I want to move the code…that I have here in App for doing my insert,…right here, I want to move this out to that file.…
So I'm going to pull that out, I'm going to come over here…to my Inserted, paste that in.…Of course, I'll need to import a few things here,…import React from 'react';,…import gql from 'graphql-tag'.…So far so good, now what I want to do is I want…to move my actual code for setting up…my subscription notification out to this file as well.…So I'll come over to App,…and I'm going to grab my widgetInserted code there.…
I'm going to pull that out, and then I'm going to hop…over to my WIDGET_INSERTED_SUBSCRIPTION,…and I'm going to paste that in like that.…And then I'm simply going to say const,…or actually, export const, also, I always recommend you…
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.