Eran Goldin
1 min readDec 5, 2019

If you care about the event that’s being passed in onChange for various reasons, you can persist it before using the debounced onChange.

onChangePersistedDebounced = e => {
const {onChangeDebounced} = this.state;

e.persist && e.persist();
onChangeDebounced(e);
};

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Eran Goldin
Eran Goldin

Written by Eran Goldin

Staff Front-End Engineer @ Bizzabo

No responses yet

Write a response