Overwrite data using Set



    Khalid Khan

    Firebase Smart Code Snippets

    This function will store the user data in the database. The first parameter is the database object, and the second parameter is an object with key-value pairs. The key is the name of the parameter, and the value is the parameter's value.

    &[USER_INPUT:1:Parameter 1]

    Shortcut: firebase.web.set

    import { getDatabase, ref, set } from "firebase/database";
    function writeUserData(Add Parameters) {
      const db = getDatabase();
      set(ref(db, Add parameters), {
        Add parameters to overwrite
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.