What is meant by the term “hook” in programming?

前端 未结 12 2500
暖寄归人
暖寄归人 2020-12-07 06:56

I recently heard the term \"hook\" while talking to some people about a program I was writing. I\'m unsure exactly what this term implies although I inferred from the conve

12条回答
  •  孤城傲影
    2020-12-07 07:30

    Simple said:

    A hook is a means of executing custom code (function) either before, after, or instead of existing code. For example, a function may be written to "hook" into the login process in order to execute a Captcha function before continuing on to the normal login process.

提交回复
热议问题