Summary
- I define a component named
ShowTopic
which takes on argument, thetopicUrl
- The component stores some data: a
topic
which contains an array ofcomments
- I use two other components,
ShowComment
andAddComment
- I define a method
fetchItems
which loads data from the remote API defined intopicUrl
- And I finally call this method as soon as the component is
created
.