fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

configureLoadStyles does not work

Open joerneu opened this issue 8 years ago • 2 comments

Bug Report

  • Package versions:

  • "office-ui-fabric-react": "5.96.0"

  • "microsoft/load-themed-styles": "1.7.56"

  • "aspnet-prerendering": "3.0.1"

  • "react": "16.3.2"

Are you willing to submit a PR to fix? (No)

Requested priority: Normal

Describe the issue:

According to the documentation, we can use configureLoadStyles to collect styles while rendering on the server.

Even if I only render:

  <Fabric>
    <DefaultButton>
      I am a button.
    </DefaultButton>
  </Fabric>

the callback of configureLoadStyles is never called.

Actual behavior:

The callback that is passed to configureLoadStyles is never called and no styles are collected.

Expected behavior:

We should be able to collect the styles to send to the client.

Also see issue: Server side rendering?

joerneu avatar May 05 '18 09:05 joerneu

+1 I am using this with Next.js but having same problem with

Package version:

next 6.0.6 office-ui-fabric-react 5.106.1

ascot31 avatar May 21 '18 13:05 ascot31

We will track this issue with #616. We have a working solution that is far better than configureLoadStyles.

dzearing avatar Jun 21 '18 03:06 dzearing