Resource Picker not displaying products

xxiao
New Member
2 0 1

Hi all,

I've been following the tutorial: https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/ and I am at the point where I've added in the Resource Picker and also have the code hooked up for the GraphQL queries. However, I am unable to get the Resource List to show via the button click:

<TitleBar
          title="Sample App"
          primaryAction={{
            content: 'Select products',
            onAction: () => this.setState({ open: true }),
          }}
        />
        <ResourcePicker
          resourceType="Product"
          showVariants={false}
          open={this.state.open}
          onSelection={(resources) => this.handleSelection(resources)}
          onCancel={() => this.setState({ open: false })}
        />

 Not sure where I may have gone wrong with coding this up. Hope you can guys assist on this.

 

0 Likes
L_J_K
Shopify Staff
Shopify Staff
147 15 24

Hey @xxiao 

I would say one plan of attack would be to get the application back to where it was before the title bar was added(this step in the tutorial), and then begin building from there. 

Failing that, it's possible to quickly spin up the working application (without fully completing it, with the Resource Picker working) by pulling the branch entitled tutorial_charge_with_billing_api here from our Github repo. and ensuring your .env file keys are pointing at the correct places. Hope that helps.

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
0 Likes
xxiao
New Member
2 0 1

@L_J_K, Thanks for the reply. I'll give your suggestion a try and let you know how it goes.