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

Where is ReactUWP.ThemeType definition #76

Open
PitterL opened this issue Mar 4, 2019 · 3 comments
Open

Where is ReactUWP.ThemeType definition #76

PitterL opened this issue Mar 4, 2019 · 3 comments
Assignees

Comments

@PitterL
Copy link

PitterL commented Mar 4, 2019

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

@myxvisual myxvisual self-assigned this Mar 5, 2019
@myxvisual
Copy link
Owner

myxvisual commented Mar 5, 2019

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 to tsconfig.json.

{
  "compilerOptions": {
    "typeRoots": [
      "./node_modules/@types"
    ],
    "filesGlob": [
      "**/*.ts",
      "**/*.tsx"
    ],
    "files": [
      "node_modules/react-uwp/index.d.ts" // add to here.
    ]
  }
}

@PitterL Can work now?

@myxvisual myxvisual added this to To do in react-native-version Mar 8, 2019
@myxvisual myxvisual moved this from To do to Done in react-native-version Mar 8, 2019
@myxvisual myxvisual removed this from Done in react-native-version Mar 8, 2019
@myxvisual myxvisual added this to To do in releases-v1.2.32 via automation Mar 8, 2019
@PitterL
Copy link
Author

PitterL commented Mar 20, 2019

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.

@lepresk
Copy link

lepresk commented Oct 2, 2020

Hi, i have same issue but i'am not using Typescript how can i deal with ReactUWP.ThemeType ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants