NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Latest Drawer 2.8.0 got error at Drawer/index.js

Open ggdegreat opened this issue 8 years ago • 1 comments

Issue Description

npm, react-native, react and native-base version,

npm 6.1.0 react-native 0.57.0 react 16.5.0 native-base 2.8.0

Expected behaviour

Drawer should be working.

Actual behaviour

Display error: Invariant violation: Text string must be rendered within a component.

Steps to reproduce

my code

  closeDrawer = () => {
    this._drawer.close()
  };

  openDrawer = () => {
      this._drawer.open()
  };
return (
      <Drawer
        ref={(ref) => this._drawer = ref}
        content={<Text>test</Text>}
        onClose={() => this.closeDrawer()} >
      </Drawer>
)

Error screenshot

error drawer

Is the bug present in both iOS and Android or in any one of them?

Android. IOS never tested.

ggdegreat avatar Nov 04 '18 01:11 ggdegreat

The above snippet is buggy Refer example https://github.com/GeekyAnts/NativeBase-KitchenSink/blob/v2.0.0/js/AppNavigator.js

SupriyaKalghatgi avatar Nov 05 '18 07:11 SupriyaKalghatgi