Commit Graph

58 Commits

Author SHA1 Message Date
Evan You
e67f655b26 refactor(runtime-core): revert setup() result reactive conversion
BREAKING CHANGE: revert setup() result reactive conversion

    Revert 6b10f0c & a840e7d. The motivation of the original change was
    avoiding unnecessary deep conversions, but that can be achieved by
    explicitly marking values non-reactive via `markNonReactive`.

    Removing the reactive conversion behavior leads to an usability
    issue in that plain objects containing refs (which is what most
    composition functions will return), when exposed as a nested
    property from `setup()`, will not unwrap the refs in templates. This
    goes against the "no .value in template" intuition and the only
    workaround requires users to manually wrap it again with `reactive()`.

    So in this commit we are reverting to the previous behavior where
    objects returned from `setup()` are implicitly wrapped with
    `reactive()` for deep ref unwrapping.
2020-02-26 19:01:42 -05:00
Evan You
a840e7ddf0 fix(types): update setup binding unwrap types for 6b10f0c
close #738
2020-02-19 18:29:18 +01:00
Evan You
8c892e0392 test: fix dts tests for 1ccecc0 2020-01-27 16:00:17 -05:00
IU
2b4d0d6501 types(reactivity): handle primitive + object intersection types in UnwrapRef (#614) 2020-01-16 17:47:47 -05:00
Cédric Exbrayat
2f6ec45d10 test: reformat defineComponent dts test (#631) 2020-01-16 17:46:25 -05:00
Cédric Exbrayat
74baea108a fix(types): components options should accept components defined with defineComponent (#602) 2020-01-13 17:12:45 -05:00
Evan You
7df5e70c83 types: accept defineComponent return types in app.mount 2019-12-24 11:04:44 -05:00
Chris Fritz
1c4cdd841d refactor(createComponent): rename to defineComponent (#549) 2019-12-22 10:58:12 -05:00