using-pnpsp-spfi-factory-interface-in-spfx">Using @pnp/sp <code>spfi</code> factory interface in SPFx<a class="headerlink" href="#using-pnpsp-spfi-factory-interface-in-spfx" title="Permanent link">&para;</a></h3>
<pre><code class="language-TypeScript">import { spfi, SPFx } from &quot;@pnp/sp&quot;;

// ...

protected async onInit(): Promise&lt;void&gt; {

    await super.onInit();
    const sp = spfi().using(SPFx(this.context));

}

// ...

</code></pre>
<h3 id="using-pnpgraph-graphfi-factory-interface-in-s