sp-dev-fx-webparts/samples/react-events-aggregator
dependabot[bot] 44d52d2ef7
Bump follow-redirects in /samples/react-events-aggregator
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 10:23:03 +00:00
..
.devcontainer added remaining containers 2022-02-16 21:47:07 -05:00
assets Changed docs links to learn 2022-10-24 09:42:45 -04:00
config react events aggregator updated to version 1.4.1 of the SPFx (#455) 2018-04-04 16:52:02 +02:00
src Changed docs links to learn 2022-10-24 09:42:45 -04:00
.editorconfig Two samples on communication between web parts through broadcasting events utilizing the Publish–subscribe pattern (#290) 2017-09-05 12:05:47 +03:00
.gitattributes Two samples on communication between web parts through broadcasting events utilizing the Publish–subscribe pattern (#290) 2017-09-05 12:05:47 +03:00
.gitignore Two samples on communication between web parts through broadcasting events utilizing the Publish–subscribe pattern (#290) 2017-09-05 12:05:47 +03:00
.npmignore Two samples on communication between web parts through broadcasting events utilizing the Publish–subscribe pattern (#290) 2017-09-05 12:05:47 +03:00
.yo-rc.json react events aggregator updated to version 1.4.1 of the SPFx (#455) 2018-04-04 16:52:02 +02:00
README.md Updated contributors for readmes 2023-03-15 00:11:27 -04:00
gulpfile.js react events aggregator updated to version 1.4.1 of the SPFx (#455) 2018-04-04 16:52:02 +02:00
package-lock.json Bump follow-redirects in /samples/react-events-aggregator 2024-01-10 10:23:03 +00:00
package.json Bump json5, @microsoft/sp-build-web and @microsoft/sp-webpart-workbench 2023-01-01 02:42:56 -05:00
tsconfig.json react events aggregator updated to version 1.4.1 of the SPFx (#455) 2018-04-04 16:52:02 +02:00
tslint.json Add tslint at the root of each SPFx project (#394) 2018-01-08 15:58:48 +02:00

README.md

SPFx Event Aggregator Sample

DEPRECATED

The event aggregator is deprecated and no longer available in the SharePoint Framework. Please use dynamic data instead. #

Following issue #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. There is already a sample in this library https://github.com/pnp/sp-dev-fx-webparts/tree/main/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 Publishsubscribe 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.

SPFx eventAggregator

Compatibility

⚠️ Important
Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.
Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility.

SPFx 1.4.1 Node.js v8 | v6 Compatible with SharePoint Online Compatible with SharePoint 2019 Compatible with SharePoint 2016 (Feature Pack 2) Local Workbench Compatible Hosted Workbench Compatible Compatible with Remote Containers

Applies to

Prerequisites

Contributors

Version history

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

Minimal Path to Awesome

  • Clone this repository.
  • Open the command line, navigate to the web part folder and execute:
    • npm i
    • gulp test (optional)
    • gulp serve

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

Features

This Web Part illustrates the following concepts on top of the SharePoint Framework:

  • Using React for building SharePoint Framework client-side web parts.
  • Using Office UI Fabric React styles for building user experience consistent with SharePoint and Office.
  • The use the SPFx event aggregator to broadcast messages (events).
  • The use the SPFx event aggregator to subscribe and receive broadcasted messages (events).
  • Unit tests including spies, mocks and faking class methods and properties.

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.