RxJS 中 'operator' 和 'method' 有什么区别?
What's the difference between 'operator' and 'method' in RxJS?
阅读RxJS的文档时,经常用到'operator'这个词
We have already used the create and range operators in previous topics to create and return simple sequences. We have also used the fromEvent and fromEventPattern operators to convert existing events into observable sequences.
那些所谓的'operators'对我来说只是简单的'methods'。
'operator'和'method'有区别吗?
由于 Observable 对象是一个 monad(一个实现 map 和 flapmap 的对象),您将使用使用方法实现的运算符来操作您的 monad。
所以运算符是关于功能项的,而方法是关于实现的。
阅读RxJS的文档时,经常用到'operator'这个词
We have already used the create and range operators in previous topics to create and return simple sequences. We have also used the fromEvent and fromEventPattern operators to convert existing events into observable sequences.
那些所谓的'operators'对我来说只是简单的'methods'。 'operator'和'method'有区别吗?
由于 Observable 对象是一个 monad(一个实现 map 和 flapmap 的对象),您将使用使用方法实现的运算符来操作您的 monad。
所以运算符是关于功能项的,而方法是关于实现的。