react-native-paper-onboarding icon indicating copy to clipboard operation
react-native-paper-onboarding copied to clipboard

Invariant Violation

Open elcrostatina opened this issue 4 years ago • 0 comments

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 avatar Nov 15 '20 03:11 elcrostatina