WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Oct 23, 2021. It is now read-only.

sp webpart base.basewebpart.oninit

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-webpart-base > BaseWebPart > onInit

BaseWebPart.onInit() method

This event method is called when the web part is initialized. virtual

Signature:

protected onInit(): Promise<void>;

Returns:

Promise<void>

Remarks

This API should be overridden to perform long running operations e.g. data fetching from a remote service before the initial rendering of the web part. The loading indicator is displayed during the lifetime of this method. This API is called only once during the lifecycle of a web part.

Clone this wiki locally