The code I am using:

<TextField onChanged={e => this.handleCommChange(e, 'Contact')}

private handleCommChange(e: any, controlType: any): void {
    const { temp_items } = this.state;
    const value = e;

      temp_items: {
        [controlType]: value

I Want to implement debounce in SPFx web part created using react js.

Please help me.


  • This question shows a lack of research and doesn't refer to any existing documentation like lodash.com/docs/4.17.11#debounce – baywet Feb 8 at 14:22
  • If it is in jquery ... I may not ask the question . As I am new es6 & spfx so I asked the question . If you can give me documentation of SPFX React (debounce) I will thank full . – BISWANATH HALDER Feb 9 at 9:09

You could leverage lodash debounce and wrap your method's body as the debounce parameter (callback)

  • than you . But I am in spfx react .. does this work ? please suggest . – BISWANATH HALDER Feb 9 at 9:10
  • Yes, you just need to add the lodash library – baywet Feb 9 at 11:52
  • ok. Than you. I will try. – BISWANATH HALDER Feb 9 at 15:34
  • Don't forget to mark the answer :) – baywet Feb 9 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.