Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library has not been updated since Nov 2019. Workarounds: 1. https://github.com/APSL/react-native-keyboard-aware-scroll-view 2. KeyboardAvoidingView & ScrollView #60

Open
louiechristie opened this issue Jun 10, 2021 · 0 comments

Comments

@louiechristie
Copy link

louiechristie commented Jun 10, 2021

Workarounds

Given this library hasn't been updated since Nov 2019, for anyone reading this I recommend the following workarounds:

  1. Use https://github.com/APSL/react-native-keyboard-aware-scroll-view

  2. Use the built in KeyboardAvoidingView, and ScrollView from React Native

// TypeScript example 😬
import React from 'react';
import { KeyboardAvoidingView, ScrollView, KeyboardAvoidingViewProps } from 'react-native';

type Props = KeyboardAvoidingViewProps & { children: React.ReactNode };

const KeyboardAwareScrollView = (props: Props): JSX.Element => {
  const { children } = props;

  return (
    <KeyboardAvoidingView style={{ flex: 1 }} {...props}>
      <ScrollView contentContainerStyle={{ flexGrow: 1 }}>{children}</ScrollView>
    </KeyboardAvoidingView>
  );
};

export default KeyboardAwareScrollView;

Inspired by this post by pepperedpopcorn on Reddit

Related issue: APSL/react-native-keyboard-aware-scroll-view#493

@louiechristie louiechristie changed the title Jest - TypeError: Cannot read property 'major' of undefined - when upgrading 0.9.3 → 0.9.4 This library has not been updated since Nov 2019. Workarounds: 1. https://github.com/APSL/react-native-keyboard-aware-scroll-view 2. KeyboardAvoidingView & ScrollView Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant