I need to put a submit text+button and get my submissions in the firebase section.
Can anyone help me with blocks image please?
P.S i need to see all comments in the firebase, so everytime someone submit a comment this will be added in the firebase.
The first one you marked why? is valid. If there is no empty list there, you cannot append an item to it. This routine does the check to ensure that the tag comments exists as an empty list.
The second one quite right, I did not spot that. Another case of I did everything like yours not being quite right in the same topic
The else provides for that (if comments list is not empty then set global comments to the list)
This approach is needed because, you cannot append if there is nothing in the tag, and it also wakes up the dataChanged event in Firebase, which won't fire otherwise.