GoodDAPP
GoodDAPP copied to clipboard
Deal with setTimeout hacks to focus an input
On IOS you cant call focus not from a user action. For now, setTimeout hacks are used
But correctly will be when target screen's component will perform auto-focus, as setTimeout solution isn't exact. We can pass additional param via .navigate then check if it was passed in useEffect and perform auto focus
Instead of auto-focusing on IOS we can make an field the first responder https://developer.apple.com/documentation/uikit/uiresponder/1621113-becomefirstresponder It will be auto-focused on first user's interaction
Need to investogate how to call this native method from RN