Skip to content

[performance] create state$ and input$ base on callback length #57

Description

@crimx

Currently Subject state$ and input$ are always created. How about checking the length of the callback argument and only create the Subjects that are used by the callback.

One caveat of this approach is the length check does not recognize spread arguments and the use of arguments object. But I think it is rare to use callback this way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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