react-uwp
react-uwp copied to clipboard
Keep getting exception 'document is not defined'
Problem description
I am trying to create Windows UWP application using react-uwp.
These are the steps I follow to create react native windows app - https://microsoft.github.io/react-native-windows/docs/getting-started#running-a-react-native-windows-app
After that I am editing App.js to include Theme from react-uwp. This is my code -
` import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View } from 'react-native'; import CheckBox from "react-uwp/CheckBox"; import { Theme as UWPThemeProvider, getTheme } from "react-uwp/Theme"; import aaa from './style.js'
const instructions = 'Press Ctrl+R to reload,\n' + 'Shift+F10 or shake for dev menu';
const theme = getTheme({ themeName: "dark", accent: "#0078D7", useFluentDesign: true, userAgent: req.headers['all'] });
export default class App extends Component<{}> { render() { return ( <UWPThemeProvider theme={theme} needGenerateAcrylic={false} // if using SSR, set this config to false, using fallback color. > </UWPThemeProvider> ); } }
ReactDOM.render( <App />, document.getElementById("app") ); `
When I run this, I get exception - 'document' is not defined. Exception is coming at backdropFilterDetector.js
Link to minimal working code that reproduces the issue
Versions
- React-UWP:1.3.1
- React: 16.8.3
- Browser: NA