Single page applications
Use this installation guide if your website is a single page application or otherwise renders HTML with Javascript.
Step 1 is to copy and paste the following snippet into all pages you want Notifly to appear on. This would usually be your template for your application (an HTML file). The snippet should be placed right before the </body>
tag:
Step 2 Is to call window.Notifly('init', ...)
as shown below when the element with the ID elementId
has been rendered:
React example
In React calling window.Notifly('init', ...)
would be done as follows.
In the component that the Notifly icon should appear in, add a useEffect
-hook similar to this:
Last updated