React Project, adding a form.

Christian Bermeo
2 min readJul 12, 2021

Project requirements

For this second phase React project at Flatiron School, I'm required to build a React single-page application from scratch using create-react-app. I must apply all my knowledge using multiple components in a way that keeps organized the code, I have to make use of props, and also state management. to this application I have to incorporate client-side routing GETTING and POSTING data in a mockup backend.

I create a Favorite movies application that prints image posters and names of the movies from JSON data created specifically for this project. You can click on the poster and it redirects to another client-side route that shows more details of the movie, accessing the data from the JSON using fetch request to GET that specific information. Also to meet the requirements I add a form in another route that POST (create) new data onto the JSON, adding the information required on the form boxes. Finally, when you add the details and submit the form it automatically returns to the main route and you can check the last movie added to your favorite movies application. View my REPO here.

Adding the form

There is a couple of ways to create forms on react, I used controlled components that when I enter information on a form and when is submitted is going to be created(added) on the application database.

--

--

Christian Bermeo
0 Followers

Software Engineer Student at Flatiron School