microsoft / powerbi-client-react

Power BI for React which provides components and services to enabling developers to easily embed Power BI reports into their applications.
MIT License
310 stars 98 forks source link

React Client does not support Preload for Embedded Power BI #69

Closed Abhra1992 closed 1 year ago

Abhra1992 commented 2 years ago

powerbi-client-react does not currently provide options to utilize powerbi.preload() in the phased embedding process. The method embedEntity() only supports powerbi.load(). What is the recommended way to use the complete phased embedding process - preload(), load() and render()? Is there a plan to add preload() support to this component?

References:

  1. https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-performance-best-practices#preload
  2. https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/preload
  3. https://github.com/microsoft/powerbi-client-react/blob/ceac9f0d91abfe936f788347fd017b9a67e0d7ab/src/PowerBIEmbed.tsx#L200
  4. https://github.com/microsoft/PowerBI-JavaScript/blob/fcbc582c3d9abe7e53c8fd6c8fc08ced15ac2483/src/service.ts#L633
anil1712 commented 1 year ago

@Abhra1992 did you get any solution for the same?

KotanaSai21 commented 1 year ago

We do support bootstrap method in the package which is the best practice. Refer to the Note in below documentation.

Preload is preferred if the powerbi content is on a different page in our web application.

References: How to preload Power BI embedded analytics content | Microsoft Learn