Skip to content

【日常踩坑】Vue3 markRaw API 的使用 #46

Open

Description

@MMmaXingXing

问题背景

进行Vue3.0项目开发的时候遇见了一个类型错误提示需要用markRaw 或者 shallRef进行转换,针对这个问题进行了解决

解决方案

整体情况介绍以及解决方案整理成了下面的文章:

https://juejin.cn/post/7113022337028456461

问题原因

复杂类型比如component等要在使用的时候注意不要被响应式转换,否则会对性能进行损耗。

相关文档

https://v3.cn.vuejs.org/api/basic-reactivity.html#markraw

Activity

  1. changed the title [-]【日常踩坑】[/-] [+]【日常踩坑】Vue3 markRaw API 的使用[/+] on Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions