Skip to content

MariaPogosjan/project-survey

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Survey form with React

This week's project is to use React to build a survey form ⚛ . This project should consist of at least 3 questions that need to be answered by users. When the user presses submit, they should see a summary of their answers.

The problem

Before I started to code I decided what question I wanted to ask in the survey. After that I clarified the logic, I added the questions in different components and defined the states for each question in the Form.js component. I rendered all the questions and added some styling to the page. When I was done with the “core” of the survey I started to code the more advanced features:

  • Show different components
  • Show a summary of the user’s submissions

I had some problems understanding how to make it work. I solved it by asking my team members, my teacher during a one to one and looking through stackoverflow.

With this help I could manage to understand how to make every component on a separate page with the if else statement and add the function to the onSubmit. I also managed to send the value from the states in Form.js and add it to the summary component with props.

Tech

  • React
  • JSX
  • useState
  • JavaScript
  • CSS

View it live

https://confident-darwin-85f2e0.netlify.app/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.3%
  • CSS 19.8%
  • HTML 11.9%