Question regarding Shopify Tutorial - edit-products.js

New Member
2 0 0

I'm working through step 6 of the following tutorial and I'm trying to understand the part about mutation.

There is a paragraph in the tutorial (below for reference) explaining how the data is brought into the component through itemToBeConsumed. I don't understand where this property comes from. I understand its part of the this keyword but I still don't understand where itemToBeConsumed comes from within this object. I searched this up on the internet and couldn't find anything on it. Can someone explain how the data is brought into this component and how this property comes about?


"The form above has its state set with data from the store. When the component mounts, the itemToBeConsumed requests the clicked item from your store, and sets up state and variables. This form will be rendered on click using the redirect action from Shopify App Bridge."