Skip to content

why useEventCallback's inputs$ and states$ opposite to their input argument order #53

Closed
@maple-leaf

Description

@maple-leaf
  const [onEvent] = useEventCallback((events$, x$, y$) => {
    x$.subscribe(x => console.log('x ', x)) // log: x [false]
    y$.subscribe(y => console.log('y ', y)) // log: y [0]
  }, [0], [false]);

I thinks x to be 0 and y to be false is expected, but useEventCallback give opposite result. Am I doing something wrong.

versions info:
rxjs-hooks: 0.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions