JSFiddle - React, Tailwind, and code Playground

by WoJWoJ

HTML

<div id="app">
  <div id="desc">height of content: {{height}}</div>
  <div id="content">{{text}}</div>
</div>

CSS

#app {
  height: 300px;
}

#desc {
  height: 100px;
}

#content {
  height: 200px;
}

JavaScript

new Vue({
	app: "#app",
  data: {
  	text: "",
    height: 5
  },
  computed: {
  	
  },
  methods: {
  	getText() {
    	fetch('http://www.randomtext.me/#/lorem/ul-8/5-36')
      .then(r => r.text)
      .then(r => { this.text = r })
    }
  },
  mounted() {
  	this.getText()
  }
})