Skip to content
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

是否可以添加销毁mutate功能 #161

Closed
zhangfisher opened this issue May 11, 2024 · 3 comments
Closed

是否可以添加销毁mutate功能 #161

zhangfisher opened this issue May 11, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@zhangfisher
Copy link
Collaborator

当前版本: 4.2.7

这样在开发SpeedForm时实现局部表单提交时,在组件的生命周期中需要动态创建mutate,但是不支持销毁mutate的功能。

const ctx = sharex({....}})

const  = stateCtx.mutate({
    desc:"id"
} )

stateCtx.removeMutate(id)

@zhangfisher zhangfisher added the enhancement New feature or request label May 11, 2024
@fantasticsoul
Copy link
Contributor

更新至版本4.3.2+,witness支持cancel调用

const witness = mutate(...);
witness.cancel(); // 取消mutate自动执行

@fantasticsoul
Copy link
Contributor

已支持

@zhangfisher
Copy link
Collaborator Author

收到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants