Reputation: 41
I am very new to using SPFx and have a general question about using its Pub/Sub model via sp-dynamic-data with DynamicDataSourceManager.
I have been using React and react Contexts/Providers quite a bit in the past and was wondering:
Thank you in advance!
Upvotes: 0
Views: 175
Reputation: 12245
As far as I know, the pub/sub for SPFx assumes communication between different web parts (applications). For example, if you have a List View on the page, and want to react to events from it, you could subscribe to its events (for example, user selected an item). Means, it is intended for interaction between different web parts / applications (from different manufacturers, maybe) that live on the same page.
In React, you are usually working within the boundaries of your own application. But, in principle, the idea is similar to context/provider - one entity publishes an event and another subscribes to it.
Upvotes: 1