CodingByJerez / react-native-alert-notification

Toast notification and dialog box notification for react native
MIT License
88 stars 22 forks source link

Root Component showing error #9

Closed mahipalsingh-syt closed 2 years ago

mahipalsingh-syt commented 2 years ago

Root Component Showing Error

Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IProps'

CodingByJerez commented 2 years ago

It was pushed 👍🏼

10

mahipalsingh-syt commented 2 years ago

thanks

mahipalsingh-syt commented 2 years ago

Getting another issue at launch Time, screen attached . Simulator Screen Shot - iPhone 13 - 2022-07-29 at 18 19 10


    return (
      <>
        <Root>
          <SafeAreaView style={styles.container}>
            <SectionList
              sections={DATA}
              keyExtractor={(_, index) => index.toString()}
              renderItem={({ item }) => <Button {...item} />}
              renderSectionHeader={({ section: { title } }) => (
                <Text style={styles.header}>{title}</Text>
              )}
            />
          </SafeAreaView>
        </Root>
      </>
    )
  }```
mahipalsingh-syt commented 2 years ago

but if removed Root from above code then code will start working but alert will not be visible

mahipalsingh-syt commented 2 years ago

@CodingByJerez

CodingByJerez commented 2 years ago

Strange it passed all the tests and for me it works. You thought about clearing the caches?

mahipalsingh-syt commented 2 years ago

i got problem , its https://reactnative.dev/docs/usecolorscheme, in my project some components support class type and usecolorscheme is functional Hook that's why its crashing @CodingByJerez

CodingByJerez commented 2 years ago

0.2.2

Normally it should work with this patch tell me.

mahipalsingh-syt commented 2 years ago

no, @CodingByJerez if you replace useColorScheme with Appearance.getColorScheme() then only it work for both class and functional component

CodingByJerez commented 2 years ago

useColorScheme is not placed in a class, It's only because you are using an old version of react native below version 0.64