Skip to content

Where is ReactUWP.ThemeType definition #76

Open

Description

@PitterL

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

Activity

  1. self-assigned this
    on Mar 5, 2019
  2. myxvisual commented on Mar 5, 2019

    @myxvisual
    Owner

    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?

  3. PitterL commented on Mar 20, 2019

    @PitterL
    Author

    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.

  4. lepresk commented on Oct 2, 2020

    @lepresk

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions