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].
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: