-
Notifications
You must be signed in to change notification settings - Fork 518
Issues integrating with office-ui-fabric-react #1197
Comments
Debugging doesn't work in IE11, but it does work in Chrome. Since Chrome also has nifty React and Redux development plugins I won't mind using this workaround. |
You didn't mention what specific error, but is it something like "Cannot read property of window/document" or another similar error due to If so, you'll need to make sure you don't rely on browser-specific APIs during server-side prerendering. You can use techniques such as You might also consider contacting the maintainers of |
@SteveSandersonMS : This They describe a workaround here: https://github.com/OfficeDev/office-ui-fabric-react#rendering-fabric-components-on-the-server-ssr but I've not yet managed to get this approach to work with the reactredux template. The exact error message is:
I hope your case-closed decision can still be reconsidered... |
Thanks for the extra info. The error message does imply it's an issue with
It's only closed because there are no further actions we can take on the code in this repo that would help in any way. |
@PFAR - Were you able to resolve this? I'm running into the same issue and trying to figure out how to get SSR, AspNetCore 2.0 and Office UI Fabric React working together. Any solution you found would be much appreciated. |
@SimplerSoftware @PFAR any luck? I'm interested as well :) tnx |
Related issue report: microsoft/fluentui#2472
Products/sites affected: JavaScriptServices + Office-UI-Fabric-React: debugging experience and server side rendering impaired
To reproduce:
Create a new project using the reactredux template.
Optionally in boot-client.tsx add
import 'core-js/es6';
for IE11 supportAdd office-ui-fabric-react 4.31.0
In package.json update:
In Home.tsx set a breakpoint in the line
return <div>
, and run the project.You still have proper debugging.
Now add an Office UI button to Home.tsx.
You will now receive an error caused by SSR.
Edit Views\Home\Index.cshtml and remove
asp-prerender-module="ClientApp/dist/main-server"
Things will now work, but the breakpoint won't hit anymore.
Removing the button from Home.tsx restored the debugging experience
What I would like to know is:
How can you integrate office-ui-fabric-react without breaking the typescript debugging experience
How do you properly enable server side rendering for a UI framework like office-ui-fabric-react (related issues: #949 and #711)
The text was updated successfully, but these errors were encountered: