> The event aggregator is deprecated and no longer available in the SharePoint Framework. Please use [dynamic data](https://learn.microsoft.com/sharepoint/dev/spfx/dynamic-data) instead. #
Following issue [#659](https://github.com/pnp/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://learn.microsoft.com/sharepoint/dev/spfx/dynamic-data](https://learn.microsoft.com/sharepoint/dev/spfx/dynamic-data). There is already a sample in this library [https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-events-dynamicdata](https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-events-dynamicdata)
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 web part 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.
> Please note the SPFx Event Aggregator is still in Alpha and **NOT SUPPORTED IN PRODUCTION USE**, but this sample will be updated in future when there are changes from the Alpha version to GA.
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.
**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.**