Book Image

Vue.js: Understanding its Tools and Ecosystem

By : Dave Berning
Book Image

Vue.js: Understanding its Tools and Ecosystem

By: Dave Berning

Overview of this book

Vue.js is one of the top three “go-to” JavaScript frameworks and is used by organizations such as Nintendo, NASA, and Expedia. This book is primarily focused on the ecosystem of Vue.js and its development tools. Understanding the basics of the technology behind the Vue.js ecosystem will improve your skills and make you a better problem solver. The book begins with a brief overview of Vue.js. You’ll learn to work your way through the Vue command line interface CLI 3, and use the Vue Router library to navigate between the different views of your application. As you advance through the topics, you’ll explore the use of DevTools to improve the quality of your applications and how to implement server-side rendering in your application through the Nuxt.js framework. Toward the end of the book, you’ll read about the future of Vue.js and its growing popularity. After reading this book, you’ll be able to create industry-grade applications using Vue.js and its tools.
Table of Contents (11 chapters)

Playing With the Code

So, to begin. Open up the app.js file in Playgrounds and delete everything but the <ActionBar /> component. NativeScript needs a base “view” just like Vue.js needs a root element. We’re going to use the <StackLayout /> component, so when you keep adding components inside, they just stack on top of each other. Let’s add a few things before building an interface.

app.js

const Vue = require("nativescript-vue");

new Vue({

  template: `
    <Page class="page">
      <ActionBar title="Home" class="action-bar" />
      <StackLayout backgroundColor="#3c495e">

      </StackLayout>
    </Page>
  `,

}).$start();

First, let’s add a <WebView />. This WebView view is like an <iframe> in the front-end web developer world; it’s a window into a website.

<WebView height="1600px" src="http://bleedingedgepress.com/...