Hello ESRI,
You provide some explainations how to create a Redux store. It is a good thing.
https://developers.arcgis.com/experience-builder/guide/widget-communication/
https://developers.arcgis.com/experience-builder/sample-code/widgets/redux/
Could you provide a sample how import it and use it in an other widget please ?
It is not clear for me.
Thanks.
@henrilebon974
I was looking at the redux sample back in March. I figured it out by copying the simple widget and updating it to subscribe to the value that the redux widget stores. I have attached it here. There are comments in the code indicating everything I did to update the simple widget to turn it into the simple-redux-subscribe widget.
Hope it helps!
Hello @DaveFullerton !
Can you please help with how to access the state in functional component. I found in the documentation that useSelect hook can be used but don't know how to.
The sample I attached works in tandem with Esri's Redux sample:
In your attached code, there's only a single widget with a redux store. Have you managed to share this redux store with another widget to communicate between them?
If you have any code snippets that can share state between widgets using a Redux store, could you please share it here, since the guide does not have that
Thank Dave. It is more clear for me.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.