JSFiddle - React, Tailwind, and code Playground

by rich_harris

JavaScript

var component = Ractive.extend({
    data: function () {
        return {};
    }
});

var c = new component()

//console.log(c.get())

//c.push('ary', 5)
//c.set({str: 'goodbye', num: 5})
//console.log(c.get())

// Only `str` and `num` get reset
c.reset()
//console.log(c.get())

// Even overriding the instance does not change it
//c.teardown()
//c = new component()
//console.log(c.get())