testshallpass / react-native-dropdownalert

An alert to notify users about an error or something else
MIT License
1.85k stars 252 forks source link

Can't display DropdownAlert. #174

Closed dev-ns8 closed 5 years ago

dev-ns8 commented 5 years ago

Short Description

I have two different errors happening, when I don't try to use any JS logic code to display the Alert and simply put it into the component tree manually as such: <DropdownAlert visible={true} type={'error'} title={'Error'} message={'Something went wrong.'} /> I get the error:

Adjacent JSX elements must be wrapped in an enclosing tag

My component tree has all enclosing tags just fine and this error only boils up when I insert a DropdownAlert component

secondly if I put logic into my constructor such as:

this.dropdown.alertWithType( 'test', 'test me', 'fucking test me bitch' );

I get an error of

undefined is not an object (evaluating '_this.dropdown.alertWithType')

Expected Results

A drop down appearing with no errors

Additional Information

testshallpass commented 5 years ago

For those who reference this issue, the ref={ref => this.dropdown = ref} was left out which caused the undefined