Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] bind is returning an array when an Object is passed through the observer. #293

Closed
Jimmy89 opened this issue Jan 6, 2023 · 1 comment

Comments

@Jimmy89
Copy link

Jimmy89 commented Jan 6, 2023

If an object is send through an observer, and the observer is binded, the hook of the bind within React returns an array (as in Object.entries(obj)).

Expected: the actual object.

Example:

const [useObj] = bind(observer$.pipe(
    tap(console.log) // <-- returns an object as expected. e.g. { key: "value"} 
), {});

export default function useDependency(dependency) {
    const obj = Obj(); // <--- returns an array as if Object.entries(obj) has been executed. Expecting an object, but returns: [key, value].
@Jimmy89
Copy link
Author

Jimmy89 commented Jan 6, 2023

Sorry for creating a ticket, it seems this was my own fault, no bug.

@Jimmy89 Jimmy89 closed this as completed Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant