Vuex Crash Course | State Management

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • In this video we will build an application using Vue.js with the Vuex state management library.
    Check Out My Sponsor - Monday.com
    go.thoughtleade...
    Code:
    github.com/bra...
    💖 Become a Patron: Show support & get perks!
    / traversymedia
    Vue.js Crash Course:
    • Vue JS Crash Course (2...
    Website & Udemy Courses:
    traversymedia.com
    Follow Traversy Media:
    / traversymedia
    / traversymedia
    / traversymedia

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

  • @DMANCHILD1
    @DMANCHILD1 5 лет назад +111

    Lets Go!! Brad don't stop ever!! Thank you sir.

  • @mixxamm
    @mixxamm 5 лет назад +270

    8:46 scaffold doesn't work anymore with the latest version of vetur, you should type 'vue' instead.

    • @LinkChenTW
      @LinkChenTW 5 лет назад +4

      Thanks for sharing this information. That's why I can't use "scaffold" now, and I even don't know this is not the default snippet.

    • @Spades340
      @Spades340 5 лет назад +1

      I got surprised this week with that too :(

    • @yonas8212
      @yonas8212 5 лет назад +2

      Thank you very much! I was wondering where did it go.

    • @synapps.filip.gorczynski
      @synapps.filip.gorczynski 4 года назад +1

      Actually there are some templates provided by VS Code plugins, so when you enter vbase and hit tab it should expand into whole section, similarly vdata for data () { return { ket: value } and I suppose many more.

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

      This doesn't work for me anymore. Alternatively you can you "html", "js" and "css" to pass through Ventur the part of the component you need.

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

    great course! quick, detailled & helpful, even if you never worked with state management

  • @mimashator
    @mimashator 5 лет назад

    ... not sure Filter Todos is a right wording
    ... It is a limit on a fetch request...
    Filter would be in getters? Right?
    filterDone state => state.todos.filter(todo => todo.done)
    displayLimit state => limit => state.todos.slice(0, limit)
    This way the state will still have all 200 from original request, and just limit the display
    Or I might be using getters incorrectly

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

    8:30vscode, extension,vetur

  • @jimh7604
    @jimh7604 5 лет назад +1

    I cant get the todos list from axios into the todo component. I get this error:
    [vuex] unknown mutation type: setTodos[object Object],[object Object],....

    • @jimh7604
      @jimh7604 5 лет назад +1

      found it. in fetchTodos, commit command was not written correctly

  • @PaoPaw098
    @PaoPaw098 4 года назад +17

    You can easily change the `$event` part in the filterTodos by this:
    Add/Replace this in FilterTodos.vue file
    1. __
    2. __
    _import { mapActions } from 'vuex';_
    _export default {_
    _name: "FilterTodos",_
    _data() {_
    _return {_
    _limit:0_
    _}_
    _},_
    _methods: {_
    _...mapActions(['filterTodos']),_
    _onChange() {_
    _this.filterTodos(this.limit);_
    _}_
    _},_
    _};_
    __
    Add/replace this in todos.js (module) file
    1. In _actions_ add this instead
    _async filterTodos({ commit }, limit) {_
    _const response = await axios.get(`__jsonplaceholder.typicode.com/posts?_limit=${limit}`)__;_
    _commit('filteredTodos', response.data);_
    _}_
    2. In _mutations_ add this instead
    _filteredTodos: (state, todos) => state.todos = todos_

  • @oz5277
    @oz5277 2 года назад +7

    for vue3
    index.js:
    import Vuex from 'vuex';
    import todos from './modules/todos';
    // Create store
    export default new Vuex.Store({
    modules: {
    todos,
    },
    });
    main.js:
    import { createApp } from 'vue';
    import App from './App.vue';
    import store from './store';
    const app = createApp(App);
    app.use(store);
    app.mount('#app');

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

      Thankyou Bro!!!!!!!!!!!!!!!!

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

      thank you! this worked when 18:59 wasn't working
      and the error I was getting was
      error 'axios' is defined but never used no-unused-vars

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

      uff I was going crazy on this thanks :D

  • @allandacasin9041
    @allandacasin9041 4 года назад +71

    Life should be simple or minimal. I'm moving now to Vue from React.

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

      awesome !!!

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

      yeah IMO React is trash

    • @i-am-learning-life
      @i-am-learning-life 3 года назад

      Same here 🤣🤣

    • @romankocherezhchenko34
      @romankocherezhchenko34 3 года назад +3

      I have no idea why people still use React, when Vue, Svelte and other awesome framworks exist, idk

    • @romankocherezhchenko34
      @romankocherezhchenko34 3 года назад +3

      @@asanokatana Even junior can rebuild React app to Vue, but Vue to React don't.

  • @TheCodeholic
    @TheCodeholic 5 лет назад +22

    It's not long time I discovered your channel and surprisingly all of the videos are REALLY valuable.
    ALL OF THEM...

    • @digitalturkistan1857
      @digitalturkistan1857 Год назад

      It's not long time I discovered your channel and surprisingly all of the videos are REALLY valuable.
      ALL OF THEM...

  • @izzatullokanoatov370
    @izzatullokanoatov370 5 лет назад +17

    I don't know , dude. Should I stand up or sit down for taking off my hat and say "THANK YOU, bro. That was mind blowing tutorial." . Good luck , bro.

  • @overnightmares
    @overnightmares 5 лет назад +16

    Hi Brad,
    @48:00 why didn't you just use e.target.value ?

  • @saurabh7199
    @saurabh7199 5 лет назад +50

    I recommended your channel to my friends who are interested in web development..

    • @TraversyMedia
      @TraversyMedia  5 лет назад +6

      Thank you :)

    • @saurabh7199
      @saurabh7199 5 лет назад +1

      @@TraversyMedia your welcome Brad. I hope you will continue to upload these great content videos in future.

    • @HimanshuPal-li7nj
      @HimanshuPal-li7nj 5 лет назад +4

      & I recommend it to anyone who is not even interested in web Technology .....

  • @mr.webdev3700
    @mr.webdev3700 5 лет назад +31

    Thank you for providing so much value to the community!!! 👍👍👍👍👍👍👍👍👍👍👍👍👍👍

  • @harbilito4910
    @harbilito4910 5 лет назад +12

    47:30 , you could just type $event.target.value in the @change method in FilterTodos.vue

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

      also use event target value in todos.js?

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

      ​@@kyrierevival3658 I boiled it down to const limit = parseInt(e.target.value); but I notice there are more concise options

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

      None of it is working, I am getting event.target is undefined in the todos.js (module) on console.log

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

    If you want to use mapGetters like he does in 17:26 you now have to add the spread operator pointpointpoint infront of it -> *...mapGetters(['allTodos'])*

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

    For those who encountered TypeError: Cannot read properties of undefined (reading 'use') -- Remove the line Vue.use(Vuex) in index.js will do. It took me hours to figure it out :")

  • @KehindeOrilogbon
    @KehindeOrilogbon 5 лет назад +31

    Brad is a mind reader... Just opened vuex docs yesterday and still on it, then he uploads this video :D. Thanks Brad

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

    You've got a special talent for keeping this simple and to the point. Even the pasting in of CSS is an excellent idea. Keep up the good work, you've got my money!

  • @kamalhm-dev
    @kamalhm-dev 5 лет назад +23

    nuxt js next please!

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

    I know this video is a little old, but how do you add Vuex to the a Vue3 main.js? There isn't like a new Vue() function in my main.js

  • @raistlinmajere2257
    @raistlinmajere2257 5 лет назад +5

    Are you going to do a Vue.js Udemy course? If you do sign me up.

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

    has jsonplaceholder been really slow for anybody else recently? takes like 59 seconds to get a response from the server which usually fails

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

    Can always count on you to have a tutorial for things I need to quickly learn.
    I hope you don't mind I listen to your videos on 1.75x speed! You still sound awesome! I just lack time these days... It's not you... it's me.

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

    8:46 "scafold(tab)" changed to "vue(tab)"

  • @PB72UK
    @PB72UK 5 лет назад +5

    Great timing , just learning vuex myself :) so this should be very helpful, will we be seeing a nuxt crash course soon? Hope so!

  • @drewbuntoo
    @drewbuntoo 3 года назад +2

    instead of "scaffold" type "default"

  • @mrrolandlawrence
    @mrrolandlawrence 5 лет назад +4

    im a new convert to Vue. React was driving me nuts (jsx) and when i looked at Angular, Vue just looked better in every way. Thanks for these tutorials.

  • @centrumsaiyan7623
    @centrumsaiyan7623 2 года назад +2

    Thanks, i'm a working developer and this tutorial is industry standard. Learnt a lot.

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

    Is there a library that will allow me to translate this latin to english before it is displayed?

  • @petarstoyanov8976
    @petarstoyanov8976 5 лет назад +5

    Thanks, Brad!
    That really helped me understand faster how to use Vuex. It's simple and elegant. So easy once you get the hang of it. Keep up to awesome work!

  • @timbass9822
    @timbass9822 5 лет назад +1

    This was a good course Brad, but I think you made a mistake to show only using ...mapActions and ... mapGetters when writing Vuex code, as it is easier (and cleaner in many cases) to use this.$store.dispatch() and this.$store.commit() in components versus overly complicating things trying to be elegant using the ...map feature of Vuex when you can just use the global. Thanks for the good work!

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

    I love to watch your tutorials. I am facing problem. Whenever I import a module that is not used for eg. I imported axios here, so it gives me an error axios defined but not used. Do you have any solution to this problem. Then when I follow along, I have to remove that import statement

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

      Go into Project Configuration>ESLintConfiguration>Rules>vue/no-unused-components and turn the slider off in the vue CLI (also turn off vue/no-unused-vars). This way you can follow along without interruption. (You can also turn off ES Lint on save, but I like keeping it because it helps point out errors)
      Be sure to flip them back on when you are done following the tutorial, this way you have the ES Lint working at full capacity to help you with your own code (esp the unused vars)

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

      @@Slipstreme Ok. Will do it. Thanks

  • @codingleaf
    @codingleaf 3 года назад +1

    24:50 I am getting Uncaught (in promise) TypeError: this.$store is undefined. in the console. I am using VUE 3. #help

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

    hy brad can you create vuex-orm am having hard time understanding it... tnx

  • @alongkorn.c
    @alongkorn.c 5 лет назад +2

    does any get this error ?
    ==> [vuex] unknown getter: allTodos

    • @colbymoore6952
      @colbymoore6952 5 лет назад +1

      I had the same error, I found that in the index.js file I had misspelled the word modules as moduels. After fixing my typo it worked perfectly. Hope this helps!

  • @edmondshek7072
    @edmondshek7072 4 года назад +8

    23:38 in case that someone may not know what the spread operator means and how it works stackoverflow.com/questions/48091687/how-exactly-does-the-spread-syntax-work-with-mapgetters

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

      I love you man, I own you a beer

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

    vuex version 4 do not work with vue 2 😀

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

    48:24 Why don't you just put a v-model on the select, assign it to a variable limit and then add an onChange and call filterTodos from there?

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

    At 46:44 when I console log the event I get: {getters: {…}, state: {…}, rootGetters: {…}, dispatch: ƒ, commit: ƒ, …}. How do I resolve this? Because I am unable to get event.target

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

      Ok never mind, realized this happens when you try and get the event without a commit in the async function

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

      @@andreminnie5981 Thank you, saved me a few minutes with this comment

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

    Anyone else having trouble with jsonplaceholder? I keep getting the CORS error. I only get the error on the POST method. I've already tried the no-cors herokuapp proxy but it's still not working..

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

      Having the same error:(

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

      @@naokobanana4291 I ended up creating my own api. I tried everything but I couldn't get the json placeholder to work

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

    I've got to re-run the server after putting the first actions and get the todos from jasonplaceholder.

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

    Anyone using Vue 3. The index.js stuff at 12:31 won't work. gitter.im/vuejs/vue?at=5f5f2fded993b837e06179c0
    From link:
    "it is because you're using Vue3. There is no use on Vue anymore.
    Check out v3.vuejs.org/guide/migration/introduction.html and especially v3.vuejs.org/guide/migration/introduction.html#breaking and specifically v3.vuejs.org/guide/migration/global-api.html#a-new-global-api-createapp
    tl;dr: use is now part of the application API, that means:
    import { createApp } from 'Vue'
    const app = createApp(/* ... */)
    app.use(/*...*/)"

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

    can't call API for post & delete on my local
    Access to XMLHttpRequest at 'jsonplaceholder.typicode.com/todos' from origin 'localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    does anyone know how to solve it?

  • @catafest-work
    @catafest-work 2 года назад

    I think is a bug because the added todo cannot react on click to mark as complete ... if I use it with the last packages I got this: warning "export 'default' (imported as 'Vue') was not found in 'vue' (possible exports: BaseTransition, Comment, EffectScope, Fragment,"

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

    Anyone care to explain further what's happenning at 47:47 const limit = parseInt(e.targer.options[e.target.options.selectedIndex].innerText); please explain as simply as possible, thanks

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

    Creating store & adding module inside the store at 12:40 did not work for me. The below one did:
    import { createStore } from 'vuex'
    import todos from './modules/todos';
    // Create a new store instance.
    export default createStore({
    modules: {
    todos
    }
    });

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

    Big help bro..best content...

  • @luisbrazilva
    @luisbrazilva 5 лет назад

    The UpdateTodo doesn't work on a todo that you add. It throws a 500 error. My understanding is, the todo I add is added in the UI but not in jsonplaceholder so when you try to do this (const index = state.todos.findIndex(todo => todo.id === updatedTodo.id);) it doesn't find id=201 because it only exists in my state....Am I understanding this right?

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

    * Also if you're using Opera. I feel I'm the only dev on the planet that uses Opera but it's powered by Blink, same as Chrome, and Chrome extensions from the Chrome store will also work 99% of the time with Opera.

  • @joseraimundofernandesfilho7570
    @joseraimundofernandesfilho7570 5 лет назад +1

    Hello Brad. I really enjoyed your videos. May I ask if you ll do a Nuxt Crash Course?

  • @gilbertintabo160
    @gilbertintabo160 3 года назад +1

    An allTodos:"(error during evaluation)" at 18:52 .Who knows how to fix this

  • @jasonjjavier6693
    @jasonjjavier6693 5 лет назад +7

    Your Crash Course is great, I have watched it since I'm in first year college and now I'm in an industry. Great help! Thank you.

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

      wow thats a very nice of u jason. good to know

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

    I have been faced typeerror-cannot-read-property-getters-of-undefined-when-serving-on-vuex-4, how do i fix this

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

    Hey Brad, RUclips automatically translates your video title to Indonesian and it looks so awkward. How can I fix it? Thanks!

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

    when building a vuejs/electron application, would you still employ vuex or rather pass everything through ipc?

  • @storyden5
    @storyden5 5 лет назад +1

    Sir I love your Videos, but Have it in mind that the next generations won't forget a Hero like you..

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

    I am stuck.at the part of the tutorial where the delete icon was added. I am unable to delete any of the todos, I keep getting the error:"TypeError: Cannot read property 'id' of undefined"

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

    nice video, vue is easy, but I really think anything Javascript and its frameworks is a big huge pile of f*cking mess, gosh I hate this language

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

    Hi everybody .. the event passed to filterTodos isn't working nor any param I do pass to the action filterTodo it simply console logs me an object with getters and setter ... you help please

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

    Event Modifiers = v-on:submit.prevent

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

      Thank you for that. I was doing this tutorial in July, 2020 and your solution fixed the old (e.preventDefault(); ) problem, where my state.todos was not updated correctly

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

    24:02 can someone explain to me the difference between computed property and computed function.
    Edit: it was an error..was so confused hehe

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

      Lol

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

      I'm getting an error too, says "Duplicate key 'computed' no-dupe-keys" how did you go about it?

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

    So used to immutable array operations in ngrx that when I saw unshift or splice my eyeballs went out of orbits ;-)

  • @chenqu773
    @chenqu773 3 года назад +1

    Nice tutorial! I am using vue/cli 4.5.13 and there are some incompatibility issues. For new version of vue/cli, it's better to select vuex directly from the vue project creation wizard, which will setup the vuex environment correctly for you.

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

    Idk why but i always dance whenever i hear your bg intro HAHAHA

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

    So we have to know about Redux before this video? I'm going to find a better source smh.

  • @jaqb_007
    @jaqb_007 Год назад

    Good tutorial. Maybe some similar Pinia course which is trending now?

  • @sweetberries4611
    @sweetberries4611 5 лет назад +1

    Literally stumbled upon this problem in my project, glad to find vuex

  • @colinmignot6309
    @colinmignot6309 5 лет назад +2

    Thank you for being soooo generous. I have 2 days of programming experience haha and your channel is really inspiring me to work learn work learn work learn.

  • @jonathanvanhoof9976
    @jonathanvanhoof9976 5 лет назад +1

    Thanks Brad. I'm learning Vue and this is really helpful. Also what I like is you don't speak / code too fast so that I can code while you speak.

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

    just want to say I hate vuex with a passion. I'm sure that I'll get it, but right now it's pure hatred and confusion

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

    Maybe you should have populated the filter values from an array property on the control then you would not need to use vanilla javascript which is ugly

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

    Tried using the fetch API instead of Axios. Lets just say next time im going with Axios 😂

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

    Referencing module's getter by string for me is just a horrible idea :/

  • @chasech0i
    @chasech0i 5 лет назад

    FYI, scoped in style tag is deprecated. shouldn't be used.

  • @samuelwestknee7134
    @samuelwestknee7134 5 лет назад +17

    every time any instructor builds his course/tutorial around TODO example - 1000 kittens die :(

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

    I do a quick search for the 'computed' lifecycle method...

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

    Why should we use spread operator for mapActions? i dont understand that part.

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

    anybody having CORS issue on Post request ?

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

    25:00 Json placeholder api call remains pending and no response is provided, anyone have tihis problem?

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

    Legend says he's still suffering from some sort of throat infection. Anyways, great video :)

  • @DarknessDescend
    @DarknessDescend 3 года назад +1

    Just like aways, I've learned a lot here! Thank you, dude!

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

    Thank you so much! After watching the Vue Crash Course and this one, I immediately became a patron. Love your content!

  • @CODINGISEASY
    @CODINGISEASY 5 лет назад +2

    Another fantastic tutorial! Thanks brad!

  • @collinsikotun1436
    @collinsikotun1436 9 месяцев назад

    Just really need to thank you cos you make things seem super easy, Kudos

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

    The number of times you said todos in this video is bigger than the number of seconds in it hhhh thanks ur very good teacher brad

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

    This is not beginner friendly at all. There are so many things not being explained.

  • @JuanLopez-ss3mz
    @JuanLopez-ss3mz 5 лет назад +1

    By the way, after adding a user change feature to the base code of the video based on the filterTodos code, I found out it's best to use event.target.value for getting the value of the selected option.

    • @luthfiabd
      @luthfiabd 5 лет назад +1

      yeah I think of it too

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

    please make a video to show how to use vuex 4 + vue 3 + typescript + vue cli latest.

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

    Thanks. It has really helped me. I really like your videos.

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

    34:58 title not showing in component, when i console it showing, but not rendering...

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

    why the todos is not showing by 3? it only show by 1 it spread across the screen

  • @Truethought689
    @Truethought689 Год назад

    Hi sir, how I can call action function on page load pls help.

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

    Damn dude, what a lifesaver! You are the best.

  • @interpulse
    @interpulse 5 лет назад +1

    You are the best teacher I've come across... Thanks for keeping it real. Respect

  • @BDJ64
    @BDJ64 5 лет назад

    Hi. Bought your course on Modern HTML & CSS from the Beginning, but UDEMY is failing to play the content. Just spins. I have reported to them, but you might want to notify them before you start getting refund requests.

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

    I came from angular, how do I explicitly set an object in a state to be a signature from a certain class? for example, I will have a user class model - export class user {id: number, name: string}. In a state, I will have myUser property in type of user class. I don't want just to write object on the fly but an explicit object. for example ... state : {muser: user {id: 7 , name: 'Hello'} }, or at getters return array in type of users, etc...
    in angular its pretty straight forward. thank you.

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

    Used the IP address instead of localhost.. clearly a cop

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

    Hello, thanks for the amazing explanation, but why did you assign onSubmit function to the submit handler, but you call the functions for onChange and onClick? do we need to call the function or just assign it?

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

    A loading icon should be shown for every request sent.