Here is my code:
function Adddetails () {
set(ref(db, ‘users/’ + phone), {
phone: phone,
parent: parent
}).then(() => {
alert(‘data updated’);
})
.catch((error) => {
alert(error);
});
};
Here is my code:
function Adddetails () {
set(ref(db, ‘users/’ + phone), {
phone: phone,
parent: parent
}).then(() => {
alert(‘data updated’);
})
.catch((error) => {
alert(error);
});
};
2
Answers
As the error displays, the components in react-native should always start with an uppercase.
in your case you are calling
<button/>
which is not a react-native component.therefore, it should be switched to
<Button />
Seems like you are confusing React concepts with React Native. In React Native we don’t have HTML based
button
. Either useButton
component imported fromreact-native
or Use aTouchableOpacity
fromreact-native
.Also if that
button
is your own component make sure it Starts with a Captial B<Button/>