Skip to content
Discussion options

You must be logged in to vote

Well, I can do this:

const getUsers = debounce((search) => {
    Inertia.get(
        "/users",
        { search: search },
    );
}, 300);

$: getUsers(search);

And I can include the whole thing in one reactive block with:

$: {
    ...
}

But there seems little benefit in that, and perhaps a downside, as the getUsers function is being declared over and over instead of just once.

But any other suggestions are welcome.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mosfetish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant