question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Warning]`keyboardWillShow` event should be registered via the Keyboard module

See original GitHub issue

The Latest version of React-native, import the module ‘react-native-keyboard-spacer’ , found a warning keyboardWillShow event should be registered via the Keyboard module,keyboardWillHide event should be registered via the Keyboard module,How to deal with the warning?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

25reactions
dejucommented, Jul 13, 2016

import {Keyboard} from 'react-native';

Keyboard.addListener('keyboardWillShow', (e) => this._keyboardWillShow(e));

5reactions
JanPetercommented, Oct 20, 2016

@joonhocho seems for me that this code is working:

  componentWillMount() {
    this.keyboardWillShowSub = Keyboard.addListener('keyboardWillShow', this.keyboardWillShow.bind(this));
    this.keyboardWillHideSub = Keyboard.addListener('keyboardWillHide', this.keyboardWillHide.bind(this));
  }

  componentWillUnmount() {
    this.keyboardWillShowSub.remove();
    this.keyboardWillHideSub.remove();
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard - React Native
The Keyboard module allows you to listen for native events and react to them, as well as make changes to the keyboard, like...
Read more >
React Native Warning: Receiving warning from the console
Once you are sure that the deprecated use is happening in a dependency you cannot control, it is possible to silence these warnings....
Read more >
Hide An Element When The Keyboard Is Shown In React Native
If you're wondering about hiding elements when the keyboard is shown in React Native (or vice-versa), here's a brief guide.
Read more >
Keyboard - React Native
The Keyboard module allows you to listen for native events and react to them, as well as make changes to the keyboard, like...
Read more >
Xcode | Apple Developer Forums
Features: Visitor Registration: This module will require the end user to register ... maybe i'm missing something First correct event: keyboard will show: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found