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

关于immutable使用场景 #65

Open
iliuyt opened this issue Sep 15, 2020 · 0 comments
Open

关于immutable使用场景 #65

iliuyt opened this issue Sep 15, 2020 · 0 comments

Comments

@iliuyt
Copy link
Owner

iliuyt commented Sep 15, 2020

immutableJs的作用是为了保证数据不可变。

应用场景:
在函数编程里面,函数不应影响之前的数据,应该返回一个新的对象。
所以在函数编程里面,应该保证参数不可变,故使用immutableJs可以解决这个问题

不适用用场景
通常我们使用的各种类中,本身该数据就是用于读写操作的,需要进行get set变更数据,不适用immutableJs

sunyongjian/blog#33

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

No branches or pull requests

1 participant