Skip to content

Option to always invoke getters #584

Description

@vidarc

🙋‍♂ Question

Follow up to this thread: #317

Where I am using immer is somewhat different to most use cases I would imagine. The application I am working on is set up with a micro front end style of architecture. We have a "shell" application with a global redux store that brings them all in and individual apps can be of any framework. We are mostly vuejs right now, which is where the issue comes. Due to this line:

if (!invokeGetters) die(1)

Would it be possible to have an option to always call the get function? Our redux store lives outside of the vue application and thus has no need for the reactivity that vue is adding with it's getter/setters. So far we have gotten around this by using patch-package to edit immer and remove the error throw. With version 6+ of immer, it doesn't look to be viable anymore as the code being bundled is all minified/uglified.

Would certainly be willing to make a contribution if this is something that can be added.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions