I'm building a chat application with React Native. I have an emoji box and need it to be shown instead of keyboard when I press the emoji icon next to the text input. When I want to focus on the text input to open keyboard again, I hide the emoji box. But it does not work so smoothly that keyboard opens too early and React can't hide the emoji box on time. I need some event which occurs before the keyboard opens or before the text input gets focused.