My question seems like one that would have been asked/answered before yet, after a couple days of searching, I cannot find a good answer. I am working off of this tutorial ( here's the git repo) but have made some small customizations, like manipulating customer metafields instead of products.
I make a query in one component (for a list of customers), but cannot figure out how to then pass a value from that query into a new component/view to be used in a new query (like passing the ID of the customer in the list that was clicked on so I can query for all of the info related to that specific customer).
This seems like a fundamental problem and I just cant find any good direction on it. I've tried using Apollo to manage local state but haven't had any success. I'm new to React so perhaps there is some easy way to handle this with states/props. Any help would be tremendous. Thanks in advance.
I, like you, am new to React. I've found this Medium article on the subject of passing data between components super helpful in the past, so I'll share it with you.
Hopefully it can help you too!