Fork me on GitHub

What’s the best way to move a view up/down with the showing/hiding of a keyboard, in a reagent/re-frame project? (Imagine a simple chat UI where the keyboard ends up covering the input-text view when it’s shown.) I’ve seen a couple js examples where they listen to lifecycle events and attach keyboardWillShow and keyboardWillHide events, and set a state to update the view size accordingly. Is there a more straightforward way to do so without mucking with lifecycle methods?


Looking through the re-frame wiki (, it mentions that you’d probably use Form-3 less than 1% of the time… Is this situation part of the 1%?


@jessica: there's a nice drop in js package for keyboard spacing. Let me check on my laptop...


But if you want to have more control over it you would have to use the lifecycle methods yes


@jessica: sorry, forgot to actually send it from my laptop. try this:


Thanks @jellea! I ended up just going with the lifecycle method route.