Created
June 19, 2023 00:44
-
-
Save Elshaman/9a3047e49775c0f254bea9628dd83924 to your computer and use it in GitHub Desktop.
Ejemplo Rxjs con teclas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fromEvent } from "rxjs"; | |
const onKeyDown$ = fromEvent(document , "keydown") | |
const observadorMouse = { | |
next: (event) =>{ | |
console.log(event.key) | |
} | |
} | |
onKeyDown$.subscribe(observadorMouse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment