October 2019
Intermediate to advanced
426 pages
11h 49m
English
We have already thought about which elements a post has when creating the mock-up. A post should have a title, content, and an author (the user who wrote the post).
Let's implement the Post component now:
import React from 'react'export default function Post ({ title, content, author }) {
return ( <div> <h3>{title}</h3> <div>{content}</div> <br /> <i>Written by <b>{author}</b></i> </div> )}
import React from 'react'import Post from ...
Read now
Unlock full access