Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js 3 Cookbook

You're reading from   Vue.js 3 Cookbook Discover actionable solutions for building modern web apps with the latest Vue features and TypeScript

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838826222
Length 562 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Heitor Ramon Ribeiro Heitor Ramon Ribeiro
Author Profile Icon Heitor Ramon Ribeiro
Heitor Ramon Ribeiro
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Understanding Vue 3 and Creating Components 2. Introducing TypeScript and the Vue Ecosystem FREE CHAPTER 3. Data Binding, Form Validations, Events, and Computed Properties 4. Components, Mixins, and Functional Components 5. Fetching Data from the Web via HTTP Requests 6. Managing Routes with vue-router 7. Managing the Application State with Vuex 8. Animating Your Application with Transitions and CSS 9. Creating Beautiful Applications Using UI Frameworks 10. Deploying an Application to Cloud Platforms 11. Directives, Plugins, SSR, and More 12. Other Books You May Enjoy

JavaScript

JavaScript has some vulnerabilities that can be prevented by following some simple checklists and simple implementations. Those implementations can be in client-server communications or DOM manipulation, but you always need to be careful not to forget them.

Here are some tips for using JavaScript:

  • Always use an authenticated and encrypted API when possible. Remember that JWT isn't encrypted by itself; you need to add the layer of encryption (JWE) to have the whole JSON.
  • Always use SessionStorage if you want to store an API token.
  • Always sanitize the HTML input from the user before sending it to the server.
  • Always sanitize the HTML before rendering it to the DOM.
  • Always escape any RegeExp from the user; it will be executed, to prevent any CPU thread attack.
  • Always catch errors and don't show any stack trace to the user, to prevent any code manipulation.

Here are some tips on what not to do when using JavaScript:

  • Never use eval(); it makes your code run slowly and...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime