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

引用webBaseComponents 时 报 BUG [mobx] Deprecated #7

Closed
eddyzhang1986 opened this issue Feb 14, 2017 · 5 comments
Closed

引用webBaseComponents 时 报 BUG [mobx] Deprecated #7

eddyzhang1986 opened this issue Feb 14, 2017 · 5 comments

Comments

@eddyzhang1986
Copy link

[mobx] Deprecated:
In MobX 2.* passing a function without arguments to (extend)observable will automatically be inferred to be a computed value.
This behavior is ambiguous and will change in MobX 3 to create just an observable reference to the value passed in.
To disambiguate, please pass the function wrapped with a modifier: use 'co
qq 20170214111342
mputed(fn)' (for current behavior; automatic conversion), or 'asReference(fn)' (future behavior, just store reference) or 'action(fn)'.
Note that the idiomatic way to write computed properties is 'observable({ get propertyName() { ... }})'.
For more details, see mobxjs/mobx#532: [email protected]

@eddyzhang1986
Copy link
Author

这个功能应该是mobx更新引起的 虽然仅仅是警告 不过对于我这种有代码洁癖的人...

@ascoders
Copy link
Owner

这段时间我在用redux重构

@eddyzhang1986
Copy link
Author

eddyzhang1986 commented Feb 17, 2017

@ascoders 欧克 thx

@ascoders
Copy link
Owner

过段时间还是准备用 https://github.com/ascoders/dynamic-object 重构,这个是 mobx 的加强版,用了 proxy。

@ascoders
Copy link
Owner

已重写

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