yyx990803 / vue-hooks

Experimental React hooks implementation in Vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useComputed 似乎和 withHooks 并非强相关?

tonylua opened this issue · comments

commented

useComputed 中会先判断 ensureCurrentInstance,而后者的提示是 “can only be called in a function passed to withHooks”;但核心逻辑只是判断 currentInstance,用 hooks mixin 的方法也能确保,提示似乎不妥