JSFiddle - React, Tailwind, and code Playground

by skirtle

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<div id="app"></div>

JavaScript

const CourseFinder = {
  template: `
  <div>
    <p>Please enter the course code:</p>
    <input
      placeholder="Please enter a course ID"
      id="main"
      v-model="inputValue"
    />
  </div>
  `,
  name: "CourseFinder",
  data() {
    return {
      inputValue: "",
      // courses: courses
    };
  },
  watch: {
    inputValue: function(newValue, oldValue) {
      console.log(oldValue);
      console.log(newValue);
    }
  }
}

Vue.createApp(CourseFinder).mount('#app')