|
|
@ -560,7 +560,7 @@ const selectOptions = options.map(({ value, label }) => (
|
|
|
|
<option value={value}> {label}</option>
|
|
|
|
<option value={value}> {label}</option>
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
class App extends React.Component {
|
|
|
|
class App extends Component {
|
|
|
|
// declaring state
|
|
|
|
// declaring state
|
|
|
|
state = {
|
|
|
|
state = {
|
|
|
|
firstName: '',
|
|
|
|
firstName: '',
|
|
|
@ -628,6 +628,10 @@ class App extends React.Component {
|
|
|
|
email,
|
|
|
|
email,
|
|
|
|
country,
|
|
|
|
country,
|
|
|
|
gender,
|
|
|
|
gender,
|
|
|
|
|
|
|
|
tel,
|
|
|
|
|
|
|
|
dateOfBirth,
|
|
|
|
|
|
|
|
favoriteColor,
|
|
|
|
|
|
|
|
weight,
|
|
|
|
bio,
|
|
|
|
bio,
|
|
|
|
file,
|
|
|
|
file,
|
|
|
|
skills,
|
|
|
|
skills,
|
|
|
@ -646,6 +650,10 @@ class App extends React.Component {
|
|
|
|
email,
|
|
|
|
email,
|
|
|
|
country,
|
|
|
|
country,
|
|
|
|
gender,
|
|
|
|
gender,
|
|
|
|
|
|
|
|
tel,
|
|
|
|
|
|
|
|
dateOfBirth,
|
|
|
|
|
|
|
|
favoriteColor,
|
|
|
|
|
|
|
|
weight,
|
|
|
|
bio,
|
|
|
|
bio,
|
|
|
|
file,
|
|
|
|
file,
|
|
|
|
skills: formattedSkills,
|
|
|
|
skills: formattedSkills,
|
|
|
@ -662,7 +670,7 @@ class App extends React.Component {
|
|
|
|
<h3>Add Student</h3>
|
|
|
|
<h3>Add Student</h3>
|
|
|
|
<form onSubmit={this.handleSubmit}>
|
|
|
|
<form onSubmit={this.handleSubmit}>
|
|
|
|
<fieldset>
|
|
|
|
<fieldset>
|
|
|
|
<legend>React Form</legend>
|
|
|
|
<legend>React Form and Form Validation</legend>
|
|
|
|
<div className='row'>
|
|
|
|
<div className='row'>
|
|
|
|
<div className='form-group'>
|
|
|
|
<div className='form-group'>
|
|
|
|
<label htmlFor='firstName'>First Name </label>
|
|
|
|
<label htmlFor='firstName'>First Name </label>
|
|
|
@ -842,7 +850,6 @@ class App extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const rootElement = document.getElementById('root')
|
|
|
|
const rootElement = document.getElementById('root')
|
|
|
|
// we render the JSX element using the ReactDOM package
|
|
|
|
|
|
|
|
ReactDOM.render(<App />, rootElement)
|
|
|
|
ReactDOM.render(<App />, rootElement)
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
@ -867,8 +874,6 @@ ReactDOM.render(<App />, rootElement)
|
|
|
|
|
|
|
|
|
|
|
|
## Exercises: Level 3
|
|
|
|
## Exercises: Level 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
🎉 CONGRATULATIONS ! 🎉
|
|
|
|
🎉 CONGRATULATIONS ! 🎉
|
|
|
|
|
|
|
|
|
|
|
|
[<< Day 11](../11_Day_Events/11_events.md) | [Day 13 >>]()
|
|
|
|
[<< Day 11](../11_Day_Events/11_events.md) | [Day 13 >>]()
|
|
|
|