Javascript 无法在react js中提示添加通道提示
我无法提示在React js项目中添加频道的消息。我在这个项目中使用firebase数据库 代码-Javascript 无法在react js中提示添加通道提示,javascript,reactjs,Javascript,Reactjs,我无法提示在React js项目中添加频道的消息。我在这个项目中使用firebase数据库 代码- const addChannel = () => { const channelName = prompt("please enter the channel name"); if (channelName) { db.collection("rooms").add({ name: channelName,
const addChannel = () => {
const channelName = prompt("please enter the channel name");
if (channelName) {
db.collection("rooms").add({
name: channelName,
});
}
};
问候,,
颤抖哪个部分不工作?
提示符
还是firebase添加?