JSFiddle - React, Tailwind, and code Playground

by cannap

HTML

<script src="https://unpkg.com/vue/dist/vue.js"></script>
<div https://jsfiddle.net/cannap/6xupouj2/1/#runid="app">

</div>

CSS

* {
  font-family: sans-serif;
}

#app {
  
  height:50000px;
}

Babel + JSX

var app = new Vue({
  el: '#app',
mounted () {
console.log('mounted')
    window.addEventListener('scroll', this.handleScroll);
  },
  destroyed: function () {
    window.removeEventListener('scroll', this.handleScroll);
  },
  methods: {
    handleScroll: function (event) {
        console.log(event)
  				let w = window
         
          console.log(w.scrollY)
    }
    }
});