课程: React: Creating and Hosting a Full-Stack Site (2022)

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Creating and linking the articles list

Creating and linking the articles list

- [Instructor] All right, so now that we have our Articles page working and displaying the correct content, depending on the URL parameter up here at the top of our browser, the next thing that we're going to want to do is actually implement our Articles page so that we can see a list of all of the articles on our site and be able to click on them and go to the corresponding ArticlePage for that article. So this is going to be pretty straightforward. What we're going to do, is go back to our IDE and open up our ArticlesListPage. And what we're going to do, is replace the current content that's in that page with, well, first of all, we'll add the title, which will be h1, and we'll just say Articles. And then underneath that what we're going to do is actually loop through all of the articles on our site, so in other words, all of the articles in this Articles array, and display those in a list underneath it, that, again…

内容