万本电子书0元读

万本电子书0元读

顶部广告

Vuex Quick Start Guide电子书

售       价:¥

8人正在读 | 0人评论 9.8

作       者:Andrea Koutifaris

出  版  社:Packt Publishing

出版时间:2018-04-12

字       数:14.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Develop consistent web apps with Vuex by easily centralizing the state of your application About This Book ? Uncover the hidden features of Vuex to build applications that are powerful, consistent, and maintainable ? Enforce a Flux-like application architecture in your Vue application ? Test your Vuex elements and Vue components using Karma/Jasmine testing framework Who This Book Is For If you are a JavaScript developer, working on Vue.js and want to extend your web development skills to develop and maintain bigger applications using state management, then this book is for you. No knowledge of Vuex is required. What You Will Learn ? Moving from classical MVC to a Flux-like architecture ? Implementing predictable centralized state management in your applications using Vuex ? Using ECMAScript 6 features for developing a real application ? Using webpack in conjunction with Vue single file components ? Testing your Vue/Vuex applications using Karma/Jasmine and inject-loader ? Simple and effective Test Driven Development ? Extending your application with Vuex plugins In Detail State management preserves the state of controls in a user interface. Vuex is a state management tool for Vue.js that makes the architecture easier to understand, maintain and evolve. This book is the easiest way to get started with Vuex to improve your Vue.js application architecture and overall user experience. Our book begins by explaining the problem that Vuex solves, and how it helps your applications. You will learn about the Vuex core concepts, including the Vuex store, changing application state, carrying out asynchronous operations and persisting state changes, all with an eye to scalability. You will learn how to test Vuex elements and Vue components with the Karma and Jasmine testing frameworks. You will see this in the context of a testing first approach, following the fundamentals of Test Driven Development. TDD will help you to identify which components need testing and how to test them. You will build a full Vuex application by creating the application components and services, and persist the state. Vuex comes with a plugin system that allows programmers to extend Vuex features. You will learn about some of the most powerful plugins, and make use of the built-in logger plugin. You write a custom Google Analytics plugin to send actions to its analytics API, and an Undo/Redo plugin. Style and approach Learn the core concepts and get started using?Vuex as a centralized state management system in your Vue.js applications.
目录展开

Title Page

Copyright and Credits

Vuex Quick Start Guide

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Code in Action

Conventions used

Get in touch

Reviews

Rethinking User Interfaces with Flux, Vue, and Vuex

MVC problems and the Flux solution

What is Vuex?

Understanding the Flux fundamentals

Actions

Dispatcher

Stores

Views

Rendering data in the stores

Stores and private components model

Summarizing Flux architecture

Benefits of using Flux

Summary

Implementing Flux Architecture with Vuex

Technical requirements

Vuex at a glance

Boilerplate code for the examples

Vue.js reactivity system explained

Understanding the core concepts of Vuex

Understanding the Vuex store

Accessing the single state tree inside components

The mapState helper

Components' local state

Computing a derived state with getters

The mapGetters helper

Changing the application state with mutations

Commiting a mutation

Enumerating mutation types using constant strings

Mutations must be synchronous

The mapMutations helper

Committing mutations within actions

Action declaration

Dispatching an action

The mapActions helper

Using modules for better scalability

Module local state

Module with namespace

Dynamic module registration

Module reuse

Enabling strict mode while developing

Form handling restrictions when using Vuex

A simple counter example

Summary

Setting Up Development and Test Environment

Technical requirements

Setting up the development environment

Using npm to prepare the project for Vue/Vuex

Using vue-loader for single-file components

Configuring the test environment

Summary

Coding the EveryNote App Using Vuex State Management

Technical requirements

Designing the EveryNote web app

Application structure

Developing the EveryNote app

Using a to-do list to help the development process

Displaying a list of notes

Creating new notes

Deleting existing notes

Updating existing notes

Other features

Recap and some considerations

Synchronizing with a remote server

Summary

Debugging Vuex Applications

Using vue-devtools

Component inspector

Events inspector

Vuex time travel

Enabling the Vuex built-in logger plugin

Summary

Using the Vuex Plugin System

Technical requirements

Understanding the Vuex plugin system

Empowering EveryNote with two plugins

Saving the app state with vuex-persistedstate

Synchronizing router data with vuex-router-sync

Developing a Google Analytics plugin

Developing an undo/redo plugin

Dealing with asynchronicity using promises

Chaining promises

Parallel execution of promises

Common mistakes when using promises

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 1个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部