当前位置:网站首页>V - memo new instructions
V - memo new instructions
2022-08-02 23:02:00 【The life of an elephant and an ant】
v-memod will remember a subtree of templates,It can be used on both span> elements and components.This command accepts a fixed-length array as a dependency value for [memory comparison].If every value in the array is the same as when it was last rendered, the update of the entire subtree is skipped.Even the VNode creation of a virtual DOM will be skipped because the memoized copy of the subtree can be reused.So the rendering speed will be very fast.It is important to note that: correctly declare the memory array.It is the developer's responsibility to specify the correct dependency array to avoid necessary updates being skipped.<li v-for="item in listArr" :key="item.id" v-memo="['valueA','valueB']">{{ item.name }}</li>v-memod's directive is used less, its role is to : cache part of the data in the template.Create it once and never update it again.That is to say, memory is exchanged for time.
边栏推荐
- 腾讯云孟凡杰:我所经历的云原生降本增效最佳实践案例
- J9 Digital Currency Theory: Identifying Web3's New Scarcity: Open Source Developers
- 谷歌竞价机器学习如何去理解?
- ShardingSphere-proxy +PostgreSQL implements read-write separation (static strategy)
- 让你的应用完美适配平板
- 当TIME_WAIT状态的TCP正常挥手,收到SYN后…
- JWT学习
- ALV report learning summary
- 【LeetCode】1374. 生成每种字符都是奇数个的字符串
- 分布式事务
猜你喜欢
随机推荐
Leetcode刷题——单调栈问题(739每日温度问题、496下一个更大元素I、503下一个更大元素 II)
Shell: conditional statements
谷歌竞价机器学习如何去理解?
软考 ----- UML设计与分析(下)
如何解决图像分类中的类别不均衡问题?不妨试试分开学习表征和分类器
idea 配置resin
Caldera(一)配置完成的虚拟机镜像及admin身份简单使用
技术分享 | Apache Linkis 快速集成网页IDE工具 Scriptis
Wintun:一款惊艳的 WireGuard 虚拟网卡接口驱动
Thread线程类基本使用(上)
MOSN 反向通道详解
TPAMI2022 | TransCL:基于Transformer的压缩学习,更灵活更强大
Geoserver+mysql+openlayers2
Office2021 安装MathType
In action: 10 ways to implement delayed tasks, with code!
2022-07-27
解析List接口中的常用的被实现子类重写的方法
Redis cluster configuration
看完这篇,轻松get限流!
【软件工程导论】软件工程导论笔记