question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New `@vueuse/math` package

See original GitHub issue

We plan to ship a new @vueuse/math package in v9.0, where you can see it in the next branch already.

We planned to adding those new functions:

Open for contributions

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
LittleSoundcommented, Jul 10, 2022

@zojize I’m trying to achieve a similar effect in useSum packages/math/useSum/index.test.ts

test('reactive list', () => {
  const list = reactive([10, 20])

  const sum = useSum(list)
  expect(sum.value).toBe(30)

  list[0] = 21
  expect(sum.value).toBe(41)

  list.push(5)
  expect(sum.value).toBe(46)
})
0reactions
LittleSoundcommented, Jul 14, 2022
  1. If the array itself is also responsive, perhaps add a watch(() => resolveUnref(nums).length, () => {}) as an iterator side effect to reinitialize when the length changes.
  2. Is Infinity a special edge case, and if so, can it be recognized and handled specially?
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found