My typeform keeps rerendering whenever I scroll anywhere in mobile device. I checked it on multiple browsers but it isn’t a browser issue either
Answered
My typeform keeps reloading whenever I scroll anywhere in mobile
Best answer by mathio-tf
You might be supplying a function to onSubmit
that changes between renders. In React if props change the component is re-rendered. Unfortunately for typeform this means the iframe is reloaded as well.
Wrapping the onSubmit
function in useCallback
solves the issue in most cases.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.