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

[1.0.9]README.md中示例代码缺失引入getTheme #5

Closed
milkeinstein opened this issue Jun 29, 2017 · 2 comments
Closed

[1.0.9]README.md中示例代码缺失引入getTheme #5

milkeinstein opened this issue Jun 29, 2017 · 2 comments

Comments

@milkeinstein
Copy link

README.md中示例代码缺失getTheme

Missing import "getTheme" in README.md

Version: 1.0.9

ERROR:

import Theme as UWPThemeProvider from "react-uwp/Theme";

RIGHT(According to website document provided by Author):

import Theme as UWPThemeProvider, { getTheme } from "react-uwp/Theme";

另外我本人是使用的这种方式引入:

import  { Theme as UWPThemeProvider, getTheme } from "react-uwp/Theme";

作者加油,持续关注中,准备在内部一个DEMO中用用看你这个主题。有条件的话看看能不能Pull点代码上来。

@myxvisual
Copy link
Owner

myxvisual commented Jun 29, 2017

@milkeinstein
这样写法是错的, 因为 ES6 没有这种写法,因为是 export 出了 defaultThemegetTheme

错误的代码示例:

import Theme as UWPThemeProvider from "react-uwp/Theme";

这样写是正确的:

import UWPThemeProvider from "react-uwp/Theme";

或者是这样:

import  UWPThemeProvider, { getTheme } from "react-uwp/Theme";

所以我的代码示例是错的, 谢谢你的纠正~
你下面的 import 写法就是对的。

谢谢支持,希望能帮到你~

@myxvisual
Copy link
Owner

myxvisual commented Jun 29, 2017

@milkeinstein 现在官网和 README 已经修正了错误的示例代码,谢谢反馈~

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