Accepted answer

Just adding that line will not get data from the server. You need to work all the way down to the end of the "Reactive State" section, creating the data file, and adding some ajax code to load the data.


You're sending data via props to CommentBox and checking for it in your CommentList component


You're sending data as a prop to CommentBox and trying to pass it on through CommentBox state.

<CommentList data={} />

instead of

<CommentList data={} />

I usually reason about props this way; Props are stuff coming in and State is stuff that's already in.

Related Query

More Query from same tag