The Wild News App is a React app that allows you to create posts. The basic structure is already implemented but there is no interactivity. [app example]: https://res.cloudinary.com/diogofgr/image/upload/v1555059513/Screenshot_from_2019-04-12_09-56-33_fbwuwc.png
-
- Start by turning
<Form />
into a controlled component. Create asubmitForm()
function inside of this component that will be called when the form is submitted. Maybe listen to thesubmit
event?
- Start by turning
-
- Pass a prop
onCreatePost
from app to<Form />
. This function should be called when the form is submitted.
- Pass a prop
-
- App should be responsible for adding a new post to the
posts
array. This should be done inonCreatePost
.
- App should be responsible for adding a new post to the
-
<PostsList />
should automatically update. If not, start debugging! :tada
-
- fix all the lint problems and deploy to your github. Share the link!
Start the local Webpack Dev Server (usually on port 8080
):
yarn start
Lint all JavaScript files in the src
folder:
yarn lint
Build and deploy your app to gh-pages
branch on the GitHub repo:
yarn deploy