Skip to content

Instantly share code, notes, and snippets.

View zeroxjackson's full-sized avatar

jackson ⁖ zeroxjackson

View GitHub Profile
@zeroxjackson
zeroxjackson / KeyboardStateEnabledComponent.tsx
Last active April 11, 2023 16:23
component level keyboard state in react-native
import React from 'react';
const KeyboardStateEnabledComponent: React.FC = () => {
const [keyboardIsOpen, setKeyboardIsOpen] = useState(false);
useEffect(() => {
const willShowEmitter = Keyboard.addListener("keyboardWillShow", () => {
setKeyboardIsOpen(true);
});