Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

onClick button event error in react-native

Render Error
enter image description here

Here is my code:

function Adddetails () {
set(ref(db, ‘users/’ + phone), {
phone: phone,
parent: parent
}).then(() => {
alert(‘data updated’);
})
.catch((error) => {
alert(error);
});
};

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

button design code is here

>Solution :

Seems like you are confusing React concepts with React Native. In React Native we don’t have HTML based button. Either use Button component imported from react-native or Use a TouchableOpacity from react-native.

Also if that button is your own component make sure it Starts with a Captial B <Button/>

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading