_spPageContextInfo.siteServerRelativeUrl is undefined which i'm using to acquire information about the web parts on a page. unfortunately, the value always returns undefined. I tried using the following.
When that is executed I get a undefined error for the
When I run the statement with
SP.PageContextInfo then the function is never executed. This is all done using typescript and React on Render. I feel as if this is a simple issue but seem to have exhausted most resources.
How to initialize the
_spPageContextInfo without a race condition for a web part that is run on SharePoint online?