Your Form was Autosaved with Vue & Firestore

Поделиться
HTML-код
  • Опубликовано: 28 янв 2025

Комментарии • 112

  • @athmanebergueddi6918
    @athmanebergueddi6918 4 года назад +78

    we need more vue content 🔥🔥🔥🔥

  • @key_michael
    @key_michael 4 года назад

    That was a pleasure, sir! That debounce it's a gift for Operational costs!

  • @rod-snts
    @rod-snts 4 года назад +18

    Finally, i was so hyped for this

  • @happynewyearw
    @happynewyearw 4 года назад +7

    🔥🔥🔥 CRAVING for more vue + firebase content !!! 🔥🔥🔥

  • @WassimTeaches
    @WassimTeaches 4 года назад +15

    Jeff, I truly like the tutorial at this slower pace. Are you experimenting with changing your fast-paced videos style? If you are, please consider sticking to this. Much easier to understand and less rewinds, at least for my tiny little brain.

    • @tevoj
      @tevoj 4 года назад +3

      You are not alone. Sometimes I slow down the video to watch. 😑

  • @Rahul-ym9uh
    @Rahul-ym9uh 4 года назад +14

    Keep that Vue content coming man, my new role is 50% Vue, 50% Python so this is all super useful. Excellent content as always!

    • @ssl2928
      @ssl2928 4 года назад +1

      Same here. I just build an desktop application using electron, vue and python.

  • @octaviusbytes
    @octaviusbytes 4 года назад +1

    0:10 "ctrl + shift + tab" it's a life saver :)

  • @kristofgilicze
    @kristofgilicze 4 года назад +1

    Quick and to the point, superb content! Thank you!

  • @RodrigoDAgostino
    @RodrigoDAgostino 4 года назад

    Vue JS FTW! So hyped to see you're doing tutorial based on it

  • @buddhanag4987
    @buddhanag4987 4 года назад +1

    Awesome nice simple tutorial ❤ wanna see vue native coming up.

  • @auguwu
    @auguwu 4 года назад +2

    Finally, I was expecting this! I hope you do a React.js tutorial since it's kinda awesome with the Hooks API and the new Concurrent API coming. Keep up the good work, Jeff!

  • @rockyrockstar6042
    @rockyrockstar6042 4 года назад +10

    Vue.js 💚
    Fireship 🔥

  • @dom8429
    @dom8429 4 года назад +45

    wouldn't it be smarter to save the form content to localstorage instead? would be easier and the user may not want to send their data to a server before hitting submit. just thinking :) edit: also your form shouldn't be super long anyways if possible. the more I think about it the less use I can see for this. but I don't want to complain, maybe somebody finds it useful :)

    • @SamuelCarreira
      @SamuelCarreira 4 года назад +7

      I was to write the same suggestion. And add a condition to clear the cached data after form is submitted or prevent automatic form fill if data is older than X time

    • @justamanchimp
      @justamanchimp 4 года назад

      That's true for a public web form maybe, say a job application or a credit check. But in this case, it's an app feature that is just helping the user, who I assume have already given permission to store such data by using the app or service in the first place. Like in this video, he built a contact app to its basics. You wouldn't expect a submit button on the iOS contacts app for example. It just saves and persists to the DB in the background.

    • @Jason-uv5tm
      @Jason-uv5tm 4 года назад +6

      I think he is trying to give a tutorial about firestore (with vue), and not localStorage, even though localStorage could be a better way (idk how secure it is tho)

    • @krishgarg2806
      @krishgarg2806 3 года назад

      @@Jason-uv5tm I mean we would just be caching the data, and we could clear the cache after submit. And many people just store auth tokens in local storage so I think using local storage for form cache should be fine

  • @Xinthose
    @Xinthose 4 года назад +5

    You could just save to local storage instead. I love using async and await instead of cascading callbacks.

  • @sagnikpradhan3594
    @sagnikpradhan3594 4 года назад

    Great video as usual!

  • @LuciferAndi
    @LuciferAndi 4 года назад

    That was a great tutorial, Thanks for that !!

  • @CodePhilipYT
    @CodePhilipYT 4 года назад

    Thanks for all the Vue.js content, I started learning it a few weeks ago, great content

  • @Gothreemall
    @Gothreemall 3 года назад

    good, easy to understand

  • @michaelpumo83
    @michaelpumo83 4 года назад

    Excellent explanations! Thank you so much.

  • @darxoonwasser
    @darxoonwasser 4 года назад +6

    I know that this video is for teaching how to connect vue with firebase, but couldn't you have also done it way easier with the localStorage?

    • @Fireship
      @Fireship  4 года назад +6

      The point is to access this data from any device, but I should have made that more clear.

    • @darxoonwasser
      @darxoonwasser 4 года назад +1

      @@Fireship ah ok

    • @dev-rock
      @dev-rock 4 года назад

      @Jack Clayton but then won't one use react ?

    • @KartikSoneji
      @KartikSoneji 4 года назад

      @@Fireship I have never started filling a form on one device and continued on another. If *any* website did this, I would be seriously concerned about my privacy.
      The online place that this makes sense is auto saving account settings. Personally, I would prefer to use localStorage for any form data for privacy reasons.

  • @abegehr
    @abegehr 4 года назад +1

    I love the use of debounce for limiting writes over time!
    One area to expand on this solution is to use browser-specific document ids since currently, all users would edit the same Firestore document /contacts/jeff. Maybe something using the browser's user agent?

  • @patrickmullot73
    @patrickmullot73 4 года назад

    A hice “Bank to the basis” video! Refrescante!

  • @meh398
    @meh398 4 года назад

    Yay, more videos ab Vue please

  • @DaveCollison
    @DaveCollison 2 года назад +1

    Another excellent video. Shame vuefire isn't ready for vue3 and firebase v9. Fingers crossed that will happen soon-ish.

  • @dominiclapitan8466
    @dominiclapitan8466 4 года назад

    The best! 💚🧡

  • @anivia3518
    @anivia3518 4 года назад +1

    is it asfe to save your db credential on frontend?

  • @SleepTri
    @SleepTri 4 года назад

    For everybody whose form doesnt update by reloading the page:
    This is the whole created hook function:
    created: async function(){
    const docRef = db.doc(documentPath);
    let data = ( await docRef.get() ).data();
    console.log("Data:" + JSON.stringify(data));
    if(!data) {
    data = { name : '', email:'', phone: '' }
    }
    this.formData = data; // not shown in the video at 7:43 //
    this.state = 'synced'; // not shown in the video at 7:43 //
    },

  • @mitch7w
    @mitch7w 4 года назад

    Dope stuff!

  • @martinzen
    @martinzen 4 года назад +1

    MOARR SVELTE VIDS!!

  • @josephtan6018
    @josephtan6018 4 года назад +3

    Pls upload video on how to structure enterprise app in Angular

  • @TheSimslash
    @TheSimslash 4 года назад

    wtf shit is so clear I can do it high on a saturday
    mfw having fun doing my work , what a wonderful world we live in
    thanks alot man keep it up

  • @esmatullahniazi7597
    @esmatullahniazi7597 4 года назад

    Cool video👏👏

  • @OneBrighDay
    @OneBrighDay 4 года назад

    Can you do a video where you use localstorge or indexeddb for when you are offline so you can store multiple contacts then when you are back online it submits to firebase?

  • @dextreme1754
    @dextreme1754 2 года назад

    What about local storage and using onload? Or is it making some kind of vulnerability like for spam bots?

  • @ioshaven436
    @ioshaven436 4 года назад

    If you already use Lodash, they have a debounce method that does the same thing.

  • @abdoufma
    @abdoufma 4 года назад +9

    So, are we just gonna ignore the 'US Gun Violence' in the project title?

  • @josephtan6018
    @josephtan6018 4 года назад +3

    NGXS in Angular pls

  • @kurishutofu
    @kurishutofu 4 года назад +2

    use `vue create -b ...` to create a project without the boilerplate

  • @1SueU
    @1SueU 3 года назад

    Does anyone know how a firestore web app like this can be passed data upon opening? For example in the video, documentPath is hardcoded. How would it be dynamically set based on perhaps a query parameter passed into the app somehow??

  • @davidsnyder518
    @davidsnyder518 4 года назад

    have you done any videos on react and firebase?

  • @omthakkar87
    @omthakkar87 4 года назад +5

    This only applies to jeff if there is another user then how to handle that

    • @YunisRajab
      @YunisRajab 4 года назад

      You get the user ID from their login and contact the id to the path

  • @Alessandro-nq3tm
    @Alessandro-nq3tm 4 года назад

    What's the difference between using debounce and a simple setTimout?

  • @RealShaktimaan
    @RealShaktimaan 4 года назад

    Vue vs Angular. Which one do you guys prefer?

  • @moto-harmony8083
    @moto-harmony8083 3 года назад +1

    Great video as always! Please, could you update this using Vite (or Vue 3) ? TIA :)

  • @punsmith
    @punsmith 4 года назад

    I never struggled with a temporarily saved form concept of Angular, but since I started dipping my toes in Vue I was curious on how to do this in Vue properly

  • @calimio6
    @calimio6 4 года назад

    Why don't use localStorage or indexDB, this way you are not retrieving data in your server if the user didn't want to register it at the end.

  • @coldderthanicee
    @coldderthanicee 4 года назад

    Please do a video on how to use figma as a beginner

  • @lmfao7224
    @lmfao7224 4 года назад

    Couldn’t this be easily done using like redux form/formik with redux persist, assuming you’re using react?

  • @_pr0xy
    @_pr0xy 4 года назад +9

    humble request: analysis and dissect of Svelte js

  • @sosun847
    @sosun847 4 года назад

    Awesome video!! Very easy to follow along.
    Only thing, if I'm not mistaken, when you use spread syntax to create a new object it will only de-reference primitive valued props right? So if our form had an object property like data.address.city and we updated it, it would also update our originalData, maybe using JSON.parse(JSON.stringify(data)) would solve this problem.

  • @hughhe4209
    @hughhe4209 4 года назад +1

    React with firestore?

  • @vatsalyasinghi438
    @vatsalyasinghi438 4 года назад

    Hi! Please do a in depth video on AWS ..

  • @lateshkudnekar7770
    @lateshkudnekar7770 4 года назад

    Hey... please do video on react hooks🎣

  • @TheSimslash
    @TheSimslash 4 года назад

    I love you man

  • @fryc.dominik
    @fryc.dominik 4 года назад +1

    Nice video! But wouldn't it be more effective to just save it to Local Storage?

    • @Fireship
      @Fireship  4 года назад +2

      That works for one device, but this would allow progress to be saved accross all devices.

  • @krishgarg2806
    @krishgarg2806 3 года назад

    I think using the local storage would be better for this use case. A db would be overkill.

  • @TheBorninmotion
    @TheBorninmotion 3 года назад

    how to minimize writes cost with this method ?)

  • @gauthamj.m4758
    @gauthamj.m4758 4 года назад

    For all those who are saying use local storage, how will you save password?

  • @Jason-uv5tm
    @Jason-uv5tm 4 года назад

    Is this vue3 or vue2?

  • @rubex.
    @rubex. 4 года назад

    Localstorage seems like a way better option here. Just dont save the password fields in localstorage!

  • @HenryIkoh
    @HenryIkoh 4 года назад

    Lol but why did you install vue-fire?

  • @rickli2108
    @rickli2108 4 года назад

    Looking for similar stuff more with React ;)

  • @bobDotJS
    @bobDotJS 4 года назад

    I love Vue

  • @dracula5752
    @dracula5752 4 года назад

    more vue videos

  • @rubenheymans1988
    @rubenheymans1988 4 года назад +2

    no not vue :(

  • @shanzid01
    @shanzid01 4 года назад +1

    Maybe encrypt the data stored in the firestore document with a local key to prevent other users from potentially accessing the document?

  • @brandonsayring
    @brandonsayring 3 года назад

    This would not scale well and will cost a lot of read/writes to firebase if the app gets bigger.

  • @acloudonthebluestsky9687
    @acloudonthebluestsky9687 4 года назад

    so cool xD

  • @mohamedelomari6480
    @mohamedelomari6480 4 года назад

    what about django ? seems you're not a fan of python . great content :clap:

  • @amilismurfs
    @amilismurfs 4 года назад

    Why don't we save this in the cookies? Then we don't need a database

  • @carltongordon
    @carltongordon 4 года назад +1

    any react content?

    • @Fireship
      @Fireship  4 года назад +1

      Yes, expect some react content soon

    • @carltongordon
      @carltongordon 4 года назад

      @@Fireship YESSS THANK YOU!!!

  • @bobbytop6109
    @bobbytop6109 4 года назад

    You can auto save with react as well.

  • @toxaq
    @toxaq 4 года назад +2

    documentPath is never changed so everyone will have the same form :)

  • @abdo.magdy.
    @abdo.magdy. 4 года назад

    instead of debounce u can use the lazy event
    vuejs.org/v2/guide/forms.html#lazy

  • @SogMosee
    @SogMosee 4 года назад

    Can you see my fire 🔥

    • @SogMosee
      @SogMosee 4 года назад

      Ok nvm, I see itnow.

  • @mioszchrzempiec4429
    @mioszchrzempiec4429 4 года назад

    full name jeff

  • @joeloliver2313
    @joeloliver2313 4 года назад

    :)

  • @ismailfathi8030
    @ismailfathi8030 4 года назад

    U so fast i can hardly keep up with your passe 😫

  • @везеттомукто
    @везеттомукто 4 года назад

    haha first

  • @milospavlovic5150
    @milospavlovic5150 4 года назад

    these tutorials ain't beginner friendly :(

  • @FilthySnob
    @FilthySnob 4 года назад

    Dude slow down a bit ffs

  • @josephtan6018
    @josephtan6018 4 года назад +2

    More Angular videos pls not vue