Last active
February 14, 2018 16:23
-
-
Save samcyn/8223427ec5fe15a514d2fbee991995fa to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/kisodag
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
var button = document.querySelector('button'); | |
Rx.Observable.fromEvent(button, 'click') | |
.throttleTime(1000) | |
.map( (data) => { return data.clientY }) | |
.subscribe( | |
(coordinate) => console.log(coordinate) | |
); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button>Click me</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RXJS BASIC EXPLAINED EASILY