I'm new to react, so this could be a simple solution that I just don't know about.
What I'm trying to do: Using app-bridge-react and conditionally load two separate ResourcePickers - one for products, the other for collections.
Why: I'd like users to select a product, or a collection
Problem I'm having: It seems that which ever ResourcePicker loads first, that is the one that persist. The second one will never load.
I have tried to use a single ResourcePicker, and update the resourceType conditionally (product or collection), but it appears that the first render locks in the resourceType, and updating it does not change the ResourcePicker
This is working as intended, once the picker is created you can only update its options but not its resource type. If you want both a Product Picker and a Collection Picker, you need to create 2 different instances and just set the open prop on each on conditionally.