Skip to content

Commit

Permalink
breaking(core): drop v2 hook compatibility (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Apr 7, 2022
1 parent 8c8f693 commit c99bbcd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,6 @@ function create<

Object.assign(useStore, api)

// For backward compatibility (No TS types for this)
useStore[Symbol.iterator] = function () {
console.warn(
'[useStore, api] = create() is deprecated and will be removed in v4'
)
const items = [useStore, api]
return {
next() {
const done = items.length <= 0
return { value: items.shift(), done }
},
}
}

return useStore
}

Expand Down

0 comments on commit c99bbcd

Please sign in to comment.