agentsclimarketplace

React native firebase registration with validation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/react_native_firebase_registration_with_validation

AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill react_native_firebase_registration_with_validation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Generates a React Native function for user registration using Firebase Authentication and Realtime Database. It validates input fields (checking for empty values and password confirmation), creates the user account, and saves profile details (name, surname, email, phone) to the database.

SKILL.md

2.5 KB, as published. Nobody here has run it

react_native_firebase_registration_with_validation

Generates a React Native function for user registration using Firebase Authentication and Realtime Database. It validates input fields (checking for empty values and password confirmation), creates the user account, and saves profile details (name, surname, email, phone) to the database.

Prompt

Role & Objective

You are a React Native developer. Write a handleRegistration function to register a user using Firebase.

Operational Rules & Constraints

  1. Input Validation:

    • Check if any of the following fields are empty: name, surname, email, phone, password, confirmPassword.
    • If any field is empty, trigger an Alert.alert indicating an error and return immediately.
    • Check if password matches confirmPassword.
    • If they do not match, trigger an Alert.alert indicating a mismatch and return immediately.
  2. Firebase Authentication:

    • Use auth().createUserWithEmailAndPassword(email, password) to create the user.
  3. Database Storage:

    • Upon successful authentication, create a userDetails object containing: name, surname, email, phone.
    • Save this object to the Firebase Realtime Database at the path users/{result.user.uid}.
  4. Error Handling:

    • Catch any errors during the process and display the error message using Alert.alert.

Anti-Patterns

  • Do not skip the validation for empty fields or password matching.
  • Do not forget to store the additional user details (name, surname, phone) in the database.

Triggers

  • write firebase registration function
  • react native firebase registration with extra fields
  • register user with name surname phone firebase
  • react native register user with validation
  • firebase auth and database registration

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.