Skip to content

usePoll() without any argument goes crazy #2229

@kaiserkiwi

Description

@kaiserkiwi

Versions:

  • @inertiajs/core version: #.#.#
  • @inertiajs/vue2 version: #.#.#
  • @inertiajs/vue3 version: 2.0.3
  • @inertiajs/react version: #.#.#
  • @inertiajs/svelte version: #.#.#

Describe the problem:

The new usePoll() composable works without any argument. That means it will just work every Millisecond and quickly crash the server if you just insert usePoll(). The expected result for me would be a sensible default (Like 2,5 Seconds as in Livewire) or at least a warning, that you have to pass a number.

Steps to reproduce:

This is all you need

<script setup>
import { usePoll } from '@inertiajs/vue3';

usePoll();
</script>

<template>
	Something
</template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions