Utilizar fluentui con hooks
Publicado por Juan José (13 intervenciones) el 17/06/2021 16:44:29
Hola buenas, estoy empezando a usar hooks, pero tengo un problema con fluentui.
Lo tengo instalado, pero cuando hago lo siguiente:
explota. El error es este:
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Cuando quito la etiqueta de fluent me funciona correctamente
Lo tengo instalado, pero cuando hago lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div className="CuerpoLogin">
<div className="ContenedorImagenTituloLogin">
<h1 className="TituloLogo">Empresa</h1>
</div>
<div>
<div>
<TextField label="text" />
<input onChange={(event) => setCliente(event.target.value)} name="cliente" label="Código cliente" />
<input onChange={(event) => setIdentificador(event.target.value)} name="identificador" label="Identificador" />
<input onChange={(event) => setContrasena(event.target.value)} name="contrasena" label="Contraseña" type="password" canRevealPassword />
<button onClick={onSubmit} className="botonPrimario" text="Iniciar sesión" />
</div>
<div>
<a href="/recuperar-contrasena" style={{ float: 'right' }}> ¿Has olvidado la contraseña?</a>
</div>
</div>
</div>
explota. El error es este:
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Cuando quito la etiqueta de fluent me funciona correctamente
Valora esta pregunta


0