Open
Description
Hi Team ReactXP.
Doing some server side rendering and getting a document is not defined
error. This problem seems to be similar to #730, fixed by 7e06794.
The issue can be replicated by rendering a ScrollView
element in a non-browser environment. In my particular use case I'm using ReactDOMServer.renderToString
, rendering a ReactXP app which includes a ScrollView
.
ReferenceError: document is not defined
at Function.Scrollbar.getNativeScrollbarWidth (node_modules/reactxp/dist/web/CustomScrollbar.js:45:21)
at new ScrollView (node_modules/reactxp/dist/web/ScrollView.js:147:66)
https://github.com/microsoft/reactxp/blob/master/src/web/CustomScrollbar.ts#L187
https://github.com/microsoft/reactxp/blob/master/src/web/ScrollView.tsx#L88