当前位置:网站首页>Five vuex plug-ins for your next vuejs project
Five vuex plug-ins for your next vuejs project
2020-11-06 01:23:00 【:::::::】
original text :5 Vuex Plugins For Your Next VueJS Project author :Anthony Gore
Use Vuex To manage Vue The state of , There are many good reasons . One of them is , adopt Vuex Plug ins can easily extend some cool features .Vuex Developers in the community have created a large number of free plug-ins for you to use , There are many functions you can imagine , There are also features you may not have thought of .
In this paper , Will show you 5 A feature , You can go through Vuex Plug ins are easily added to the next project .
- State persistence
- Sync tab 、 window
- Language localization
- Manage multiple load states
- Cache operations
1. State persistence
vuex-persistedstate Use the browser's local storage ( local storage ) To state ( state ) persist . This means that refreshing the page or closing the tab will not delete your data .
A good example is the shopping cart : If a user accidentally closes a tag , They can reopen and go back to the state of the previous page .
2. Sync tab 、 window
vuex-shared-mutations Status can be synchronized between different tabs . It passes through mutation
Save state to local storage (local storage) To achieve . tab 、 When the content in the window is updated, the save event is triggered , Call again mutation
, To keep the state synchronized .
3. Language localization
vuex-i18n Allows you to easily store content in multiple languages . Make it easier for your app to switch languages .
One cool feature is that you can store strings with tags , such as "Hello {name}, this is your Vue.js app."
. All translations will use the same string where they are marked .
4. Manage multiple load states
vuex-loading Helps you manage multiple load states in your application . This plug-in is suitable for real-time applications with frequent and complex state changes .
5. Cache operations
vuex-cache Can be cached Vuex Of action
. for example , If you retrieve data from the server , The plug-in will call this for the first time action
Cache results when , And then after that dispatch
in , Return the cached value directly . It's also easy to clear the cache if necessary .
Welcome to the comments below , Write down your favorite Vuex plug-in unit !
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .
版权声明
本文为[:::::::]所创,转载请带上原文链接,感谢
边栏推荐
- 10 easy to use automated testing tools
- ES6 essence:
- 一篇文章带你了解CSS 渐变知识
- 如何玩转sortablejs-vuedraggable实现表单嵌套拖拽功能
- Skywalking series blog 5-apm-customize-enhance-plugin
- ES6学习笔记(四):教你轻松搞懂ES6的新增语法
- Common algorithm interview has been out! Machine learning algorithm interview - KDnuggets
- 從小公司進入大廠,我都做對了哪些事?
- Arrangement of basic knowledge points
- Can't be asked again! Reentrantlock source code, drawing a look together!
猜你喜欢
Filecoin最新动态 完成重大升级 已实现四大项目进展!
怎么理解Python迭代器与生成器?
如何将数据变成资产?吸引数据科学家
Filecoin的经济模型与未来价值是如何支撑FIL币价格破千的
Windows 10 tensorflow (2) regression analysis of principles, deep learning framework (gradient descent method to solve regression parameters)
Flink的DataSource三部曲之二:内置connector
Python download module to accelerate the implementation of recording
PHP应用对接Justswap专用开发包【JustSwap.PHP】
阿里云Q2营收破纪录背后,云的打开方式正在重塑
Computer TCP / IP interview 10 even asked, how many can you withstand?
随机推荐
How to select the evaluation index of classification model
How to become a data scientist? - kdnuggets
嘗試從零開始構建我的商城 (二) :使用JWT保護我們的資訊保安,完善Swagger配置
如何将数据变成资产?吸引数据科学家
小程序入门到精通(二):了解小程序开发4个重要文件
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
助力金融科技创新发展,ATFX走在行业最前列
Didi elasticsearch cluster cross version upgrade and platform reconfiguration
ES6学习笔记(二):教你玩转类的继承和类的对象
Face to face Manual Chapter 16: explanation and implementation of fair lock of code peasant association lock and reentrantlock
Vuejs development specification
Summary of common string algorithms
Synchronous configuration from git to consult with git 2consul
Brief introduction and advantages and disadvantages of deepwalk model
Just now, I popularized two unique skills of login to Xuemei
6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
Common algorithm interview has been out! Machine learning algorithm interview - KDnuggets
The difference between Es5 class and ES6 class
[C / C + + 1] clion configuration and running C language
快快使用ModelArts,零基礎小白也能玩轉AI!