async function handleOnSend(messages) {
        let newMessage = {
            ...messages[0]
        }

        const writes = () => db.add(newMessage);

        await writes();
    }
//A function call when btnSend message is clicked
A function call when btnSend message is clicked
A function call when btnSend message is clicked
async function handleOnSend(messages) {
        let newMessage = {
            ...messages[0]
        }
        const writes = () => db.add(newMessage);
        await writes();
    }
async function handleOnSend ( messages ) { let newMessage = { ... messages [ 0 ] } const writes = ( ) => db . add ( newMessage ) ; await writes ( ) ; }
A function call when btnSend message is clicked
A function call when btnSend message is clicked