My Firebase project looks like - 
Suppose I have multiple database entries in the announcements, then which is the best way to pass each announcement entry to a react - native component which takes Popup and Longtext as props.
I tried something like this:
returnNotificationCards() { var newArr = this.state.notContainer; return newArr.map((line) => { return <NotificationCards Popup = { line.Popup } longText = { line.Longtext } /> }); } componentDidMount() { let dataContainer firebase.database().ref('/announcements/').on('value', (snapshot) => { snapshot.forEach((childSnapshot) => { var childData = childSnapshot.val(); dataContainer.push(childData) }); }); this.setState({ notContainer: dataContainer }) } But the code is not working. Here the component to which the Firebase data should be passed is NotificationCards.