Object.observe remove in chrome 50

2019-07-17 10:46发布

I had a warning message in Chrome, this one notice that Object.observe method is deprecated and will be removed in Chrome 50 around April 2016.

Have you an alternative solution to replace Object.observe ?

Thanks

1条回答
放荡不羁爱自由
2楼-- · 2019-07-17 10:57

So it was depricated and will be removed because of some problem with perfomance. Please see this link http://www.infoq.com/news/2015/11/object-observe-withdrawn

I think you should look into RxJS library and it's Observable

Using RxJS, you can represent multiple asynchronous data streams (that come from diverse sources, e.g., stock quote, tweets, computer events, web service requests, etc.), and subscribe to the event stream using the Observer object. The Observable notifies the subscribed Observer instance whenever an event occurs.

https://github.com/Reactive-Extensions/RxJS/

查看更多
登录 后发表回答