Skip to content

class instances with private properties #4977

@Mr-Yavar

Description

@Mr-Yavar

I have a data object that is an instance of a class with some private properties. Due to the limitations of JavaScript proxies, I use markRaw, making it non-reactive.
I manage the component state using useField. However, when I use useForm, it tries to make the object reactive, leading to the error: 'Uncaught (in promise) TypeError: attempted to get private field on non-instance.' This occurs because Vue attempts to access private fields that are not accessible in a reactive context.
now I want to know, how can I keep object non-reactive?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions