Your first GraphQL component
Abhi Aiyer
863

Love your minimal, Single Responsibility tutorials :). Two quick questions about the code though:

1.

App.js:29 => let PeopleList = function PeopleList({ data }) {

and then

App.js:58 => PeopleList = PeopleContainer(PeopleList);

If I am not mistaken, you are reusing the same variable (PeopleList). This, however, makes it difficult for me to follow what’s going on. Is it correct to assume that line 58 (PeopleList = ..Container…) means that we are creating our SmartComponent out of a ContainerComponent and a VisualComponent? If so, could the line be re-written as => const PeopleListComponent = PeopleContainer(PeopleList)?

2. Is there a semantic reason for declaring Person as a function, but letting PeopleList be a let?

Again, thanks for the tutorial. Extremely helpful when trying to understand the base interactions between React, GraphQL and Apollo.

Like what you read? Give Manol Kalinov a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.