diff --git a/samples/react-events-aggregator/README.md b/samples/react-events-aggregator/README.md index c6cfe0727..8c8bd408d 100644 --- a/samples/react-events-aggregator/README.md +++ b/samples/react-events-aggregator/README.md @@ -1,5 +1,9 @@ # SPFx Event Aggregator Sample # +# Important: The event aggregator is deprecated and no longer available in the SharePoint Framework. Please use [dynamic data](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data) instead. # + +Following issue [#659](https://github.com/SharePoint/sp-dev-fx-webparts/issues/659), the event aggregator functionality is no longer working. This feature was in ALPHA state and never made it to general availability state. There is a replacement for the event aggregator. Please have a look at the dynamic data functionality and use it instead [https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data). There is already a sample in this library [https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-events-dynamicdata](https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-events-dynamicdata) + ## Summary This sample shows how we can use the SPFx Event Aggregator to communicate between web parts through broadcasting events utilizing the [Publish–subscribe pattern](https://en.wikipedia.org/wiki/Publish–subscribe_pattern). It enables a webpart or component to raise event (broadcast message) through the SPFx event aggregator and that event is received by other web parts or components that have been subscribed to receive it. @@ -34,6 +38,7 @@ Version|Date|Comments -------|----|-------- 0.0.1|August 22, 2017 | Initial commit 0.0.2|March 20, 2018 | Updated to SPFx v1.4.1 +0.0.3|November 18, 2018 | Sample deprecated ## Disclaimer **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** diff --git a/samples/react-events-aggregator/src/webparts/broadcaster/components/Broadcaster.tsx b/samples/react-events-aggregator/src/webparts/broadcaster/components/Broadcaster.tsx index 7ee55e27c..1115082c2 100644 --- a/samples/react-events-aggregator/src/webparts/broadcaster/components/Broadcaster.tsx +++ b/samples/react-events-aggregator/src/webparts/broadcaster/components/Broadcaster.tsx @@ -23,6 +23,7 @@ export default class Broadcaster extends React.Component
+

Important: The event aggregator is deprecated and no longer available in the SharePoint Framework. Please use dynamic data https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data instead. See the README.md file for more details.

Event Message: {this.state.eventNumber}

Broadcast message diff --git a/samples/react-events-aggregator/src/webparts/receiver/components/Receiver.tsx b/samples/react-events-aggregator/src/webparts/receiver/components/Receiver.tsx index 13d04fff3..3a65f7f05 100644 --- a/samples/react-events-aggregator/src/webparts/receiver/components/Receiver.tsx +++ b/samples/react-events-aggregator/src/webparts/receiver/components/Receiver.tsx @@ -26,6 +26,7 @@ export default class Receiver extends React.Component
+

Important: The event aggregator is deprecated and no longer available in the SharePoint Framework. Please use dynamic data https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data instead. See the README.md file for more details.

Received events:

{ this.state.eventsList.map((item: { index: number, data: number }) => {