react-uwp
react-uwp copied to clipboard
Where is ReactUWP.ThemeType definition
Problem description
I saw there is mark theme as the "ReactUWP.ThemeType", but i don't see anywhere import the ReactUWP, what's the mean of this?
When i comment in git, it will show this is not definition: 15:21 error 'ReactUWP' is not defined no-undef
export default class ShellComponent extends React.Component {
static contextTypes = { theme: PropTypes.object };
context: { theme: ReactUWP.ThemeType };
....
Link to minimal working code that reproduces the issue
Versions
- React-UWP:
- React:
- Browser:
The problem is not at compile be when i commit the code to repository, it will occur the error
Usage
React-UWP components require a theme to be provided.
The quickest way to get up and running is by using the Theme
to inject the theme into your application context.then, you can use any of the components as demonstrated in documentation.
If you coding by Typescript, add
ReactUWP
namespace totsconfig.json
.
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types"
],
"filesGlob": [
"**/*.ts",
"**/*.tsx"
],
"files": [
"node_modules/react-uwp/index.d.ts" // add to here.
]
}
}
@PitterL Can work now?
Not yet, i guess it may some conflicts with eslint tool. But I'm not professional with this, so I pending this issue and continue to go for development.
I will come back to investigate it later.
Hi, i have same issue but i'am not using Typescript how can i deal with ReactUWP.ThemeType ?