Skip to content

辅助组件构造器behavior注入位置不正确、配合MobX时TS类型存在缺陷 #83

@Wyatex

Description

@Wyatex

如果配合官方的mobx-bindins一起用,会有个比较致命的问题:

  • mobx-bindings通过behavior注入,那么再使用ComponentWithComputed进行构造,computedBehavior注入的位置在mobx-binding的behavior之前,导致第一次读取绑定的值是undefined。

而且ComponentWithComputed的computed读data读不到bingdings的类型,只能通过断言指定类型,看着比较膈应,不知道有没有更优雅的解决方式。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions