import React, {Component} from "react" class App extends Component { constructor() { super() this.state = { firstName: "", lastName: "", age: "", destination: "", milkoRLactoseAllergyorIntolerance: false, eggAllergyorIntolerance: false, shellfishAllergyOrIntolerance: false, peanutorTreeNutAllergyOrIntolerance: false, } this.handleChange = this.handleChange.bind(this) } handleChange(event) { const {name, value, type, checked} = event.target type === "checkbox" ? this.setState({ [name]: checked }) : this.setState({ [name]: value }) } render() { return (




Gender:



Where are you headed?


Dietery Restrictions:





Entered information:

Your name: {this.state.firstName} {this.state.lastName}

Your age: {this.state.age}

Your gender: {this.state.gender}

Your destination: {this.state.destination}

Your dietary restrictions: {/* Dietary restrictions here, comma separated */}

) } } export default App