Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

227
Vistas
How to Sign up new users using Firebase V9 & React?

My goal is the sign up new users with email and passwords using firebase v9. I have been reading their documentation and gotten this far. I need help with the createUserWithEmailAndPassword function.

import React, {useState} from 'react';

import { getAuth, createUserWithEmailAndPassword } from "firebase/auth";

function SignUp() {
    const [email, setEmail] = useState("");
    const [password, setPassword] = useState("");

    const auth = getAuth();

    createUserWithEmailAndPassword(auth, email, password)
    .then((userCredential) => {
        // Signed in 
        const user = userCredential.user;
       ** // ... LOST HERE ... HOW DO I CODE THIS PART // **
    })
    .catch((error) => {
        const errorCode = error.code;
        const errorMessage = error.message;
     **   // .. LOST HERE ... HOW DO I CODE THIS PART // **
    });

    return (
        <div className="container">
            <div className="sign-up">
                <h1>SignUp</h1>
                <form>
                    <label>Email</label>
                    <input type="email"
                    name="email" 
                    placeholder="email" 
                    value={email}
                    onChange={(e) => setEmail(e.target.value)}
                    />
                    <label>Password</label>
                    <input 
                    type="password" 
                    name="password" 
                    placeholder="Password" 
                    value={password}
                    onChange = {(e) => setPassword(e.target.value)}    
                    />
                    <button type="submit">Sign Up</button>
                </form>
            </div>
        </div>
    )
};
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda