I've created a webpart using SPFX GA. In the externals section of the config.json I've added the following from the layouts folder.

  • init.js
  • microsoftajax.js
  • sp.runtime.js
  • sp.js
  • sp.ui.dialog.js

In the webparts.tsx they are added as Required('name').

However when trying to add a notification using SP.UI.Notify.addNotification("message",false);, it says that SP.UI.Notify is undefined.

Is this not available in a SPFX webpart?


The SP.UI namespace correspond to the classic SharePoint UI and, as far as I know, doesn't have an equivalent in modern sites. While you could theoretically load all scripts, required to use this namespace, the notification would not be shown on modern sites.

  • Ok, thanks for your response Waldek. Any idea if there is a modern replacement for notifications? I haven't found it yet. – user64939 Feb 25 '17 at 17:10
  • the fabric Message class is kind of similar, you could try that – russellg Feb 26 '17 at 15:01
  • I haven't seen any documentation of it @user64939. It could be that it's still in making. – Waldek Mastykarz - MVP Feb 27 '17 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.