Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 9694 | Rev 9761 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 9694 Rev 9759
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
-
 
2
import { useForm } from 'react-hook-form'
Línea 2... Línea 3...
2
 
3
 
-
 
4
const FormView = ({ actionLink }) => {
-
 
5
 
-
 
6
  const { handleSubmit, register } = useForm()
-
 
7
 
-
 
8
  const onSubmit = (data) => {
-
 
9
    console.log(data)
3
const FormView = () => {
10
  }
-
 
11
  return (
-
 
12
    <section className="container">
-
 
13
      <div className="row">
-
 
14
        <div className="col-xs-12 col-md-12">
-
 
15
          <form onSubmit={handleSubmit(onSubmit)}>
-
 
16
            <div className="form-group">
-
 
17
              <label>Nombre</label>
-
 
18
              <input
-
 
19
                type="text"
-
 
20
                name="name"
-
 
21
                className="form-control"
-
 
22
                ref={register({ required })}
4
  return (
23
              />
-
 
24
            </div>
-
 
25
          </form>
-
 
26
        </div>
-
 
27
      </div>
5
    <div>FormView</div>
28
    </section>
6
  )
29
  )
7
}
30
}
8
export default FormView
31
export default FormView