Skip to content

React exercise for beginners - practice controlled components and callbacks as props

Notifications You must be signed in to change notification settings

diogofgr/wild-news

Repository files navigation

Wild News

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 a submitForm() function inside of this component that will be called when the form is submitted. Maybe listen to the submit event?
    • Pass a prop onCreatePost from app to <Form />. This function should be called when the form is submitted.
    • App should be responsible for adding a new post to the posts array. This should be done in onCreatePost.
    • <PostsList /> should automatically update. If not, start debugging! :tada
    • fix all the lint problems and deploy to your github. Share the link!

Scripts

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

About

React exercise for beginners - practice controlled components and callbacks as props

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published