Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting exception 'document is not defined' #102

Open
nitinsap opened this issue Feb 25, 2020 · 0 comments
Open

Keep getting exception 'document is not defined' #102

nitinsap opened this issue Feb 25, 2020 · 0 comments
Assignees

Comments

@nitinsap
Copy link

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.
>

);
}
}

ReactDOM.render(
,
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
@myxvisual myxvisual self-assigned this Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants