From the course: Building a GraphQL Project with React.js

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Working with conditional classes

Working with conditional classes

- [Instructor] Let's take a look at how we can do something a little bit more useful with our application. What I'd like to show is whether or not I'm subscribed to some of these repositories. Now to do that, I need to modify my query to add a field called viewer subscription. But this is going to show me a field that shows me whether or not I'm subscribed to this particular repository. So let's go into the RepoInfo.js file, and we're going to need to modify this template to make it work with our new information. So to do that after this list item, I'm going to create a div and I need to add some classes onto this. So className and these are going to be some Flexbox classes, d-flex just to make it look nice, justify oops justify-content-between and align-items-center. So, this div is going to have another div in it and these are just bootstrap divs. I'm using bootstrap five here. So, let's see d-flex and flex-column.…

Contents