Skip to content

Instantly share code, notes, and snippets.

@AsishP
Created November 12, 2018 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AsishP/b7044ff70c002a5d32228f1f24a553cc to your computer and use it in GitHub Desktop.
Save AsishP/b7044ff70c002a5d32228f1f24a553cc to your computer and use it in GitHub Desktop.
// SPFx context init below
public onInit(): Promise<void> {
return super.onInit().then(_ => {
// other init code may be present
sp.setup({
spfxContext: this.context
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment