Skip to content

Allow reactive options in signal based adapters #162

@benjavicente

Description

@benjavicente

TanStack Pacer version

0.19.0

Framework/Library version

Solid, Angular

Describe the bug and the steps to reproduce it

In the React adapter, options for pacer APIs are reactive, and update when the given options object change.

But in Solid and Angular, the APIs accept only a object as an argument, and since those functions only run once, there is no way the adapter can update the options by itself like React. In other libraries, like query and hotkeys, options allow (or are given only by) a function in the signal based adapters (Solid, Angular, etc).

This can be annoying in some cases in Angular, since input signals can't be read on initialization, so there would be no simple way to use any of pacer APIs when the options depend on the component inputs.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

No repo since this is a behaviour issue. Here are links to the code for rate limiter, where react updates the options but the other adapters do not: React, Solid, Angular. Note that only React calls setOptions.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

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