Day 1
Today we'll be creating the Info
, ArticleList
, and StarButton
components.
Info
This component should display an InfoResource
(defined in resources.ts
).
I recommend creating a component Block
that contains just the border and padding, so that we can reuse that part for other components.
For help creating a
Block
, see: Arbitrary Children
ArticleList
This component should display a list of ArticleResource
(defined in resources.ts
).
Consider breaking down this component further into, for example:
- an
Article
component, displaying the content of a single article - an
ArticleList
, mapping an array ofArticleResource
intoArticle
components - a
Block
component (if we made one earlier) for the border and padding
StarButton
First, we could make a Button
component that takes arbitrary children
. Then, we can make a StarButton
which wraps it and passes in the Star
component and a title.
App
Finally, we can assemble these into our top-level App
component.
Contents