jarlyyn
V2EX  ›  Node.js

现在非常喜欢用 bind 来解决 callback 中的 this 问题,有没有隐患?

  •  
  •   jarlyyn · Oct 28, 2014 · 4370 views
    This topic created in 4399 days ago, the information mentioned may be changed or developed.
    如题。

    现在感觉凡是需要callback的地方,基本都是func.bind(this,aa,bb)这样来操作了
    1 replies  •  2014-10-28 23:22:27 +08:00
    livelazily
    livelazily
    Oct 28, 2014 via Android
    1
    参考 https://www.v2ex.com/t/122105 bind过后不能再bind
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4027 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:36 · PVG 17:36 · LAX 01:36 · JFK 04:36
    ♥ Do have faith in what you're doing.