8000 [effector-vue] DeepReadonlyRef with non-primitive values in useUnit breaks usage · Issue #1130 · effector/effector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[effector-vue] DeepReadonlyRef with non-primitive values in useUnit breaks usage #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
7iomka opened this issue Aug 13, 2024 · 2 comments
Labels
effector-vue effector-vue package typings Typescript public type definitions issues

Comments

@7iomka
Copy link
Contributor
7iomka commented Aug 13, 2024

When we use useUnit with array of something / object, the result have DeepReadonlyRef, and that make problematic or even impossible to use data from it for something like props, due to ts error of incompatible types.

Demo: Link

Missing/Incorrect APIs

https://github.com/effector/effector/blob/master/packages/effector-vue/composition.d.ts#L83

https://github.com/effector/effector/blob/master/packages/effector-vue/composition.d.ts#L101

@7iomka 7iomka added the typings Typescript public type definitions issues label Aug 13, 2024
@zerobias zerobias added the effector-vue effector-vue package label Aug 13, 2024
@zerobias zerobias added this to the effector Neowise 24 milestone Aug 13, 2024
@zerobias
Copy link
Member

Seems like readonly should be achieved by simpler approach, not deep read only types

@7iomka
Copy link
Contributor Author
7iomka commented Aug 13, 2024

Seems like readonly should be achieved by simpler approach, not deep read only types

I agree.
Readonly native type is enough.
Control over nested mutation should be on the user's side (I guess when working with vue + effector users are aware of this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effector-vue effector-vue package typings Typescript public type definitions issues
Projects
None yet
Development

No branches or pull requests

2 participants
0