JSFiddle - React, Tailwind, and code Playground

by kodisha

HTML

<script src="https://unpkg.com/[email protected]/lib/mobx.umd.js"></script>

Babel + JSX

const {observable, computed} = mobx;


var t = new class Temperature {
	@observable unit = 'C';
  @observable temperatureCelsius = 25;
  
  @computed get temperatureKelvin() {
  	return this.temperatureCelsius * (9/5) + 32;
  }
  
  
}


console.log(t.temperatureKelvin);

console.log(t.temperatureKelvin);