wip(ssr): revert reactivity ssr paths

The perf gains are not worth the correctness issues these paths may lead to
This commit is contained in:
Evan You
2020-01-27 15:15:13 -05:00
parent cc47ae0118
commit 763faac182
4 changed files with 8 additions and 25 deletions

View File

@@ -36,14 +36,6 @@ export function ref(value?: unknown) {
return value
}
value = convert(value)
if (__SSR__) {
return {
_isRef: true,
value
}
}
const r = {
_isRef: true,
get value() {
@@ -66,7 +58,7 @@ export function ref(value?: unknown) {
export function toRefs<T extends object>(
object: T
): { [K in keyof T]: Ref<T[K]> } {
if (__DEV__ && !__SSR__ && !isReactive(object)) {
if (__DEV__ && !isReactive(object)) {
console.warn(`toRefs() expects a reactive object but received a plain one.`)
}
const ret: any = {}