当前位置:网站首页>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 .
版权声明
本文为[:::::::]所创,转载请带上原文链接,感谢
边栏推荐
- Filecoin主网上线以来Filecoin矿机扇区密封到底是什么意思
- Just now, I popularized two unique skills of login to Xuemei
- xmppmini 專案詳解:一步一步從原理跟我學實用 xmpp 技術開發 4.字串解碼祕笈與訊息包
- 6.5 request to view name translator (in-depth analysis of SSM and project practice)
- Real time data synchronization scheme based on Flink SQL CDC
- Brief introduction and advantages and disadvantages of deepwalk model
- ES6 essence:
- “颜值经济”的野望:华熙生物净利率六连降,收购案遭上交所问询
- Process analysis of Python authentication mechanism based on JWT
- Using consult to realize service discovery: instance ID customization
猜你喜欢

至联云解析:IPFS/Filecoin挖矿为什么这么难?

ES6学习笔记(二):教你玩转类的继承和类的对象
![[C / C + + 1] clion configuration and running C language](/img/5b/ba96ff4447b150f50560e5d47cb8d1.jpg)
[C / C + + 1] clion configuration and running C language

如何玩转sortablejs-vuedraggable实现表单嵌套拖拽功能

2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...

IPFS/Filecoin合法性:保护个人隐私不被泄露

I've been rejected by the product manager. Why don't you know

Calculation script for time series data

PHPSHE 短信插件说明

做外包真的很难,身为外包的我也无奈叹息。
随机推荐
Python crawler actual combat details: crawling home of pictures
做外包真的很难,身为外包的我也无奈叹息。
每个前端工程师都应该懂的前端性能优化总结:
快快使用ModelArts,零基礎小白也能玩轉AI!
(2)ASP.NET Core3.1 Ocelot路由
What problems can clean architecture solve? - jbogard
从海外进军中国,Rancher要执容器云市场牛耳 | 爱分析调研
Common algorithm interview has been out! Machine learning algorithm interview - KDnuggets
vue-codemirror基本用法:实现搜索功能、代码折叠功能、获取编辑器值及时验证
TRON智能钱包PHP开发包【零TRX归集】
如何将数据变成资产?吸引数据科学家
Not long after graduation, he earned 20000 yuan from private work!
Just now, I popularized two unique skills of login to Xuemei
ES6 essence:
Synchronous configuration from git to consult with git 2consul
Every day we say we need to do performance optimization. What are we optimizing?
一篇文章带你了解CSS对齐方式
Relationship between business policies, business rules, business processes and business master data - modern analysis
Examples of unconventional aggregation
Save the file directly to Google drive and download it back ten times faster