'How can I convert Web 8 version to Web 9 in Firebased
import firebase from 'firebase/compat/app';
import React , {useState} from 'react'
import { EmojiIcon, GIFIcon, ImageIcon, PollIcon, ScheduleIcon } from '../icons/Icon'
import db from '../firebase';
import { collection } from 'firebase/firestore';
const TweetBox = () => {
const [content, setContent] = useState('');
const sendTweet = () => {
if (content !== '') {
collection(db,'feed').add({
displayName: 'Talha',
userName: '@talhayavcin8',
content,
timestamp: firebase.firestore.FieldValue.serverTimestamp(),
avatar: 'https://pbs.twimg.com/profile_images/1471200875414790152/P4ESp6xE_400x400.jpg',
});
setContent('');
}
};
I have a problem with Firebase in my Twitter clone app. How can I convert this to web 9 version?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
