The CitySpark portal and widgets work on sites that dynamically load their content such as those built with React. The script can be loaded onto the page at any time and works just fine if it is loaded dynamically as is the case with React or other frameworks. The issue that can sometimes occur is that after the calendar has rendered the javascript framework will remove it from the page or re-run the script. This is usually due to the framework rerendering the dynamic html and placing it on the page multiple times. If using a framework such as React the best way to fix this is to create a Component and implement “shouldComponentUpdate” and return false to keep the component from rerendering which also helps general performance of the page. If the portals content is removed from the page and then re-rendered by running the script additional times a message will be written to the console of the page as this has performance implications but does still work for end users.
The portal doesn't display on my React website

Written by Support
Updated over 9 months ago