Using a list inside another list


Hi Antti. I tested several times your demo and looks like it has the same problem. Please take a look at the prints. I never commented on Pauli’s post. This happen right after you post a new Status. Not a comment.


Actually, data are saved in the right place and data slots are alright. Feed is messy only after making a new Post Status. if you go to another screen and come back, everything will be fine.


Yeah it’s probably about that state is not updated for list items with arrays because the comments array is not created the “standard React Studio way”. I’ll check this with developer tomorrow.


great! wishing they will find the solution. Thank you []


Hi, I discussed with developer and the issue is in the Code template and how React updates lists. Here’s a new code template for my demo project:

import React, { Component } from ‘react’;
import ‘./App.css’;
import firebase from ‘firebase’;

export default class {{CLASS_NAME}} extends Component {


constructor(props) {

this.state = {


_updateItems = (docKey) => {
const db = firebase.firestore();
const collection = db.collection(SocialFeed/${docKey}/comments);
this._cancelSnapshot = collection.onSnapshot(
(querySnapshot) => {
let jsonArr = [];
let key = 0;
querySnapshot.forEach((doc) => {
const data = { …, key: key++, document_key:, document_ref: doc.ref };
this.setState({_items: jsonArr, _itemsDocKey: docKey});

componentDidMount() {

componentWillUnmount() {

componentDidUpdate() {
let itemsDocKey = this.props.dataSheetRow.document_key;
if (this.state._itemsDocKey && this.state._itemsDocKey !== itemsDocKey) {

componentWillReceiveProps(nextProps) {


In case the forum breaks the code here it is in text file:


Awesome Antti! And again, thank you for sharing such good tool