JSFiddle - React, Tailwind, and code Playground

by Eric Howe

HTML

<div class="btn">Test</div>

CSS

.btn {
    border: 1px solid black;
    padding: 1em;
    margin: 1em;
    display: inline-block;
    background-color: #eee;
}

CoffeeScript

class FirstClass
    btnClick = -> console.log('FirstClass: ', @)
    constructor: ->
        $('.btn').click => btnClick.call(@)

class SecondClass extends FirstClass
    btnClick = -> console.log('SecondClass: ', @)
    constructor: (@where_is = 'pancakes house?') ->
        super()
    
@obj = new SecondClass