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

Invariant Violation #27

Open
elcrostatina opened this issue Nov 15, 2020 · 0 comments
Open

Invariant Violation #27

elcrostatina opened this issue Nov 15, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@elcrostatina
Copy link

Bug

After installing the library, this error appears when starting the app

photo_2020-11-15_04-40-06

Environment info

Library Version
@gorhom/paper-onboarding 1.0.0
react-native 0.61.5
react-native-reanimated 1.8.0
react-native-gesture-handler 1.6.1
react-native-svg 10.1.0

Steps To Reproduce

  • Install the library
  • Create a screen that uses it
  • Compile and run the app

Reproducible sample code

import React from 'react';
import { View } from 'react-native';
import PaperOnboarding, {
  PaperOnboardingItemType,
} from '@gorhom/paper-onboarding';

export class OnboardingScreen extends React.Component<any, any> {
  render() {
    const data: PaperOnboardingItemType[] = [
      {
        title: 'Hotels',
        description: 'All hotels and hostels are sorted by hospitality rating',
        backgroundColor: '#698FB8',
      },
      {
        title: 'Banks',
        description:
          'We carefully verify all banks before add them into the app',
        backgroundColor: '#6CB2B8',
      },
      {
        title: 'Stores',
        description: 'All local stores are categorized for your convenience',
        backgroundColor: '#9D8FBF',
      },
    ];

    const Screen = () => {
      const handleOnClosePress = () => console.log('navigate to other screen');
      return (
        <PaperOnboarding data={data} onCloseButtonPress={handleOnClosePress} />
      );
    };

    return (
        <Screen />
    );
  }
}
@elcrostatina elcrostatina added the bug Something isn't working label Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant