React Redux Tutorials - 7 - Store

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • 📘 Courses - learn.codevolu...
    💖 Support UPI - support.codevo...
    💖 Support PayPal - www.paypal.me/...
    💾 Github - github.com/gop...
    📱 Follow Codevolution
    + Twitter - / codevolutionweb
    + Facebook - / codevolutionweb
    📫 Business - codevolution.business@gmail.com
    Store in Redux

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

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

    So put in simple terms ,the below is the Redux essence or pattern
    1)we create a store
    2)declare the initial state and the reducer
    3)define the actions and action creators
    4)subscribe to the store
    5)dispatch actions to update the store
    6)And finally unsubscribe to the changes (in the store).

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @reflextionsdev
    @reflextionsdev 2 года назад +6

    createStore is deprecated, can you update for configureStore?

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

      same error. if you found the solution then please share.

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

    i didnt understood this fully one doubt please clarify it: when store.dispatch method is called how the store.subscribe method will get called??

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

    Error: Actions must be plain objects. Use custom middleware for async actions.
    error what solve
    when node index

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

      I am also faced this, just return object as below to avoid that error in BuyCake function . Cheers
      function BuyCake(){
      let sample = {
      type: BUY_CAKE,
      info:'First action '
      };
      return sample;

      }

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

      you should use a middleware which is 'redux-thunk' for async actions.

  • @yokaigamestudio463
    @yokaigamestudio463 4 года назад +73

    You are really the best at explaining redux. I've watched 5+ others but this is so clear.

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

      you prolly dont give a shit but if you're bored like me atm you can stream pretty much all of the new series on InstaFlixxer. I've been streaming with my girlfriend for the last couple of months xD

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

      @Cesar Michael Yea, I have been watching on InstaFlixxer for since december myself :D

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @vergil_389
    @vergil_389 Год назад +8

    Fix to all your errors,
    const redux = require('redux');
    const createStore = redux.createStore()
    // replace the above two lines with the one below
    import { legacy_createStore as createStore} from 'redux'
    also add this
    "type": "module",
    to package.json after
    "description": "",

  • @swarnimsharma3717
    @swarnimsharma3717 4 года назад +27

    Hats off 2 u such a great explanation i really needed this , i have watched all your videos of react , hook , redux , very nicely explained keep it up thanku

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

      Hi Swarnim! Are you a student or working currently? Would you be interested in software developer opportunities?

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

      @@shivanigaddagimath6105 yes I want..

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

      @@jiteshjoshisde3154 Hi Jitesh! Can we please get in touch through LinkedIn or gmail? Just search for Shivani Gaddagimath on LinkedIn and request to connect please. The first profile that pops up is mine.

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

      @@jiteshjoshisde3154 Hi Jitesh! Please get in touch with me on LinkedIn if interested in the opportunity.

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @kresimircosic3753
    @kresimircosic3753 4 года назад +11

    For anyone getting the error:
    Reducer is not a function
    1) Just remove the 2nd line of code completely, it's totally unnecessary.
    2) Where it said (like line 30-ish):
    const store = createStore(reducer)
    Put:
    const store = redux.createStore(reducer)

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

      @Obscure Anonymous I have no idea, it's been a long time, maybe the API changed not sure. Even though I think it should work, he was just passing a reference to the method from redux package. Sorry I couldn't help in answering lol. Maybe even destructuring could work, instead of doing what I said, try on his 2nd line to write:
      const { createStore } = redux;
      Leave the bottom part as his, because in my head now it should work, but ofc it might not xD

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

      Thanks man

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

      Thanks Bro

  • @sherifkhattab1313
    @sherifkhattab1313 5 лет назад +8

    I don't get it why this channel has far less subscriptions that what it deserves !!!

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

    After I ran the code my output is like
    10,9,9,9 why 🤔

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

      my output is like,
      Initial state : [object Object]
      update state : [object Object]
      update state : [object Object]
      update state : [object Object]

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

    I am facing this error:
    Initial state 10
    Updated state { numberOfCakes: NaN}
    Updated state { numberOfCakes: NaN}
    Updated state { numberOfCakes: NaN}

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

      Hi Aman! Are you a student or working currently? Would you be interested to explore software dev roles?

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

    vishwas sir i don't know how should i thank you cause i have followed plenty of tutorials from very famous channel of programming like Traversy Media, Mosh Hamidani but no one explained the redux as easy as you did thank you so much for this i was really struggling to learn redux but now it feels like wow

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

      Hi Nihal! Are you a student or working currently? Would you be interested in software developer opportunities?

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

      @@shivanigaddagimath6105 pls comment here if you have any frontend dev opportunities

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

      @@sourabhkumar3852 Hi Sourabh! We do have opportunities available for freshers and experienced developers. Kindly connect with me on LinkedIn. Find my contact information on my channel.

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @soulju9144
    @soulju9144 Год назад +5

    Honestly really impressed by how you're breaking this down. Gave me perfect clarity. I had previously tried figuring out what all this was doing just by looking at previously created code and was completely lost. Your video series has helped so much

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

      I am in the same situation. I've been presented with a new React codebase and I have been completelly lost for a week now.This videos are making everything more and more readable

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    reason why we do "cosnt unsubscribe = ~" is store.subscribe() returns a ""function"" for unsubscribing listener!

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

    Iam Facing a problem
    console.log("initialstate",store.getState())
    is giving undefined value
    but the const unsubscribe=store.subscribe(()=>console.log("Updated State",store.getState()))
    is working perfectly.Plzz Help me

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

      You must be missing the default in switch statement or you might not have used return keyword in default.. I was also facing the same issue. It worked

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

      @@apoorvtiwari7612 It helped me, thanks!

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

    Thanks a lot! Please consider Redux Sagas in your upcoming lessons

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @NoumanKhan-ck7vx
    @NoumanKhan-ck7vx 2 года назад +1

    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

  • @prisinha
    @prisinha 2 года назад +11

    1:11
    getState() function = allow access to state,
    dispatch(action) = allows state to be updated,
    subscribe(listener) = registers listener

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

      don't understand line no 32 why const unsubscribe u write ?????

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

      @@vishwajeetyadav4480 where written unsubscribe ?

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

      @@prisinha yes why hi written const unsubscribe?

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

      @@vishwajeetyadav4480 not able to understand your question

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

      @@prisinha 😕

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

    Finally i understood after watching so many tutorial i find your tutorial the best thanks bro 😍

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    What if I want to create 2 stores but I am restricted to give variable name as initialState for initial state, how to do that.

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

      Hi Piyush! Are you a student or working currently? Would you be interested to explore software dev roles?

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

    why we need unsubscribe ??

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

      +1

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

      It's required once you are done with that element and you no longer want to monitor it's state change.

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

    This video is outdated please update this one as createStore method is deprecated

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

      same error. if you found the solution then please share.

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

    I am having this error please help
    Initial State { numofCakes: 10 }
    Updated State { numofCakes: 10, numOfCakes: NaN }

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

      Typo in the key... use numOfCakes in both places

  • @tech-tuts
    @tech-tuts 4 года назад +2

    I'm using "redux": "^4.0.5" and I need to mention `redux` as an object before createStore function as the following:
    const store = redux.createStore(reducer)
    Otherwise, I got ReferenceError: createStore is not defined.

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

      I guess you could destructure and import createStore from redux library too for it to recognize in global scope. something like import { createStore } from 'redux';

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

      @@kanikarungta4452 Hi Kanika! Are you a student or working currently? Would you be interested in exploring jobs in software development?

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @Abhishekkumar-vd5ov
    @Abhishekkumar-vd5ov 4 года назад +3

    after dispatching buyCake() how action calls the reducer?

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

      i'm having the same question, but I think by calling createStore and passing reducer to it.

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

      Hi Abhishek! Are you a student or working currently? Would you be interested in exploring jobs in software development?

    • @Abhishekkumar-vd5ov
      @Abhishekkumar-vd5ov 3 года назад

      @@shivanigaddagimath6105 I am working but not looking for job change.

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

      @@Abhishekkumar-vd5ov Okay. Thanks for your reply.

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

    i had this error : "Expected the reducer to be a function."

    • @mizanalharun57
      @mizanalharun57 5 лет назад +23

      const redux = require('redux');
      const createStore = redux.createStore; [ here not redux.createStore(); ]

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

      @@mizanalharun57 thanks!

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

      remove line2 and replace line30 by
      const store = redux.createStore(reducer)
      It worked for me

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

      @@bishnulama7520 thanks, this worked for me

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

      @@mizanalharun57 thank you bro....... I was too confused...

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

    Why you have not used ES6 Import statement and used require("redux"). Is there any specific reason, even you have used spread operator (...) of ES6.

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

      watch from the beginning. he specifically addresses this.

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

    Hello Thanks for the tutorial , i have one question :
    const reducer = (state = initialState , action)=>{
    switch(action.type)
    {
    case BUY_CAKE : return {
    ...state,
    numofCakes:state.numofCakes-1
    }
    we have assigned here state as initialState but action is just action , how reducer will come to know the i have defined my action function as well .
    Pls help

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

      with action.type inside 'swith' parenthesis you start your action and define it with 'case' statement. case => BUY_CAKE

    • @IntotheWildscape
      @IntotheWildscape 4 года назад +4

      while dispatching we pass action object/action creator where we have the action defined which will reach to reducer, so reducer will understand this as its second param. Hope make sense.

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

      Hi Vijay! Good to see curious learners like you! Are you a student or working currently? Would you be interested to explore software dev roles?

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

    it is throwing an error for me

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

    Thanks for the amazing videos!
    If we dispatch buy cake after unsubscribing, the state wouldnt change?

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

    and how the fuck i am getting this for free...man im following maximillian(big fan of him too) on udemy and that guy fucked my head while explaining redux.....i came on youtube and found this man....big fan sir big fan..will surely check out your courses,,..

  • @luis.carlosrodriguez1561
    @luis.carlosrodriguez1561 3 года назад +2

    hey there, great REDUX video, amazing training. one question: line 31 returns an 'UNDEFINED' everytime I run but when you run the same code, you get the initialState. confused...
    thank you for the series.

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

      Where you got const reducer = (state, action) => {, just add const reducer = (state = initialState, action) => {

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    Feedback is that Vishwas should never include Node JS into React JS

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

    Always your video is awesome. Please Make example video create small website using react + react hooks + redux. using images and dynamic content.

  • @mora7883
    @mora7883 3 месяца назад

    My answer is coming 10,9,9,9, not decreasing, any one can help

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

    i just started, but i believe it's a pure gold. Thank u a lot for this videos. I starting thinking that i can understand redux with your help.

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

      don't understand line no 32 why const unsubscribe u write ?????

    • @itxchiii
      @itxchiii Месяц назад

      @@vishwajeetyadav4480 he's storing subscribe method in a constant, and then calling it at the end to unsubscribe.
      "to unsubscribe from the store, call the function returned by the subscribe method

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

    What significance of Unsubscribe() method ??

  • @sandrajsaju6552
    @sandrajsaju6552 11 месяцев назад

    Listen at 1.04 or 1.05 there is a telephone ringing....so what?😅

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

    Finally, I can speak English indian accents

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

    Hi really like your series! Can you please explain in more detail what subscribe and unsubscribe methods do?

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

    Hi everyone. Can anyone explain how does calling unsubscribe() actually tells redux to unsubscribe?

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

      I also have the same question

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

    Thank you for this simple, short step by step videos for understanding Redux, I am learning this in my training at work!

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    Hi bro.
    Are there any breaking changes from react-redux v6 to v7.
    For using react-redux with hooks

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

      Hi Srikanth! Are you looking out for jobs in software dev currently? We are hiring!

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

    can you make video on using redux with redux saga ?

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

    now i got the idea of redux
    thanks a lot

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

    Are these videos still useful in 2022 or are they outdated ?

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

    Please further this series with redux advanced concepts such as middlewares

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

      Hi Kirankumar! Are you a student or working currently? Would you be interested in software developer opportunities?

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @Arjun-ll7zg
    @Arjun-ll7zg 3 года назад +1

    You are explaining each concept clear and which good pace (not too fast not too slow.) , Thanks for it brother.

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

    title is react redux but goes on to use vanilla js

  • @kavithat6954
    @kavithat6954 2 месяца назад

    createStore has been deprecated 😢

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

    I like this video. And I'm one of those idiots who learn react and redux at the same time. So, I thought this things are broken because programming for a very long time, I have witnessed the 'evolution' of programming languages, assembly to c, c++, python - as we go higher, we have less things to type and deal with. But after watching this, it looks a lot less broken ... but it is still!. I'm from an object oriented team, so that 'buyCake' function should be doing remote calls, manage the error handling and take care of emitting 'SUCCESS' and 'FAIL' scenarios, and also when it is a 'SUCCESS' scenario, the buyCake should update the current inventory and shopping cart, that means being able to fire two actions, and maybe fire another action like print receipt. This logic is not a button's responsibility.

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

    very good thanks

  • @GurkiratSingh-pn6yu
    @GurkiratSingh-pn6yu 6 месяцев назад

    What reducer function do here ?

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

    Couldnot understand the subscribe part, when it gets called? Does it gets called automatically after dispatch method

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

    Thanks a lot, bro for this awesome explanation

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

      Hi Lalit! Are you a student or working currently? Would you be interested in software developer opportunities?

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

    don't understand line no 32 why const unsubscribe u write ?????

    • @warpcore6959
      @warpcore6959 8 месяцев назад

      The store.subscribe method returns a function . You can call it whatever you want in this case he called it unsubscribe which stops the subscription

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

    very well explained

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

    Hey Vishwas, First of all, thanks for creating this series, you are very good at explaining things. I have one question about tutorial 7, where you created the store and used the subscribe method but why did you assign the subscribe method to unsubscribe variable and where did this unsubscribe function come from in the last line??

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

      i guess you should code this way cause it works as expected

    • @RakeshSingh-yd7xo
      @RakeshSingh-yd7xo Год назад

      I am also confused about it.

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @AbhishekKumar-yi8bu
    @AbhishekKumar-yi8bu 2 года назад

    TypeError: CreateStore is not a function showing this error in the terminals

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

      same error. if you found the solution then please share.

  • @adithyabharadwaj9957
    @adithyabharadwaj9957 3 месяца назад

    CreateStores depreatiated

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

    man hats off to you, what a great explanation and correlating things with a real-life example, finally understood the redux pattern, thank you so much.

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

      Hi Riya! Are you a student or working currently? Would you be interested in software developer opportunities?

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    When you type node index in terminal you are getting what you written in console am not getting it am a beginner can you explain me this

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

    Can we not use local storage to pass data from one component to another or to store data. We can create our own class component which will work as a store and we can create our own get set methods in that particular class. How is that diff from redux ? Any one please clarify

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

    It was a crystal clear explanation. Thanks dude...keep up😎

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

      Hi Safal! Are you student or working currently? Would you be interested in exploring software development job opportunities?

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

      @@shivanigaddagimath6105 Hello shivani, I am currently pursuing pgd but would love to explore about opportunities. Let me know if any!!

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

      @@safalpatel2839 That's great! Can we please get in touch through LinkedIn or gmail? Just @ Shivani Gaddagimath on LinkedIn and request to connect please. The first profile that pops up is mine.

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

      don't understand line no 32 why const unsubscribe u write ?????

  • @FatmavHassan
    @FatmavHassan 10 месяцев назад

    Thank you so much this is the first time in my entire life to understand the concept of redux.. all the best for you

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

    For buy cake you are creating one more object instead you change prop in state and return the same

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

    best in class teacher

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

    why not we just pass intial state as an parameter to createStore function
    const store = createStore(initState)

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

    what is the visual studio code theme you're using?

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

    He's not from this planet, really appreciate his work

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

    Why should dispatch an action to update state and not update store directly?

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

    Thank you for explaining. This is the best redux explaining I have ever seen

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

      Hi Samir! Are you looking out for software development roles currently? Where are you based?

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

      @@shivanigaddagimath6105 Hi Shivani. Yes

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

      @@samirvaliyev Hi Samir! Thanks for showing interest. Can we please connect on LinkedIn or gmail for more details? Please search Shivani Gaddagimath on LinkedIn and request to connect. The first profile that pops up is mine.

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    How does it get initialState, it is passed as default param?

    • @mysterious_billionaire
      @mysterious_billionaire 7 месяцев назад

      it is passed as a parameter in this line..
      const reducer = (state = initialState, action) => {

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

    Please make videos on redux toolkit and rtk query

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

    Sir what if we don't use subscribe..?

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

    A small doubt:
    You always pronouncing '=' symbol as 'equals to '.
    But i heard that in programming '=' symbol is pronounced as 'assign'
    and double '=' symbol ('==') is pronounced as 'equals to'
    Which is correct ???

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

      "Equal to" is how = is read mathematically in everyday English, so it is something we commonly hear and understand without much thought. == as "is equal to" is correct in the context of programming because it is a comparison in the same way as a single = is mathematically. Often times we still refer to = as "equal to" in everyday English though out of habit. Really, = means assign as in "x assigns value y". Some people say assign for accuracy and to try to prevent confusion between = and ==, but also a lot of English speakers are not used to hearing it so many of us just say equal to out of habit. Everyday English is a language where convention often overrules accuracy :)

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

    request: can we have react-redux typescript series? hehehe

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

    Anyone can explain the flow of execution please

    • @Saibalakrishnaallamsetty
      @Saibalakrishnaallamsetty Год назад +1

      If I understand correctly,
      - First, a store is created using createStore() method
      - Then the subscribe() method listens to any state change events
      - Whenever we dispatch an action like buyCake(), reducer handles it and updates the state
      - This state update is being listened by subscribe() method hence it logs the updated state
      - Unsubscribe is simply to tell you application to stop listening to any state changes further
      Hope it helps!

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

    Can you share file slide ? Thank you.

  • @varchas-v8777
    @varchas-v8777 4 года назад

    What if we don't unsubscribe ?

  • @Mot-cong-mot-la-hai
    @Mot-cong-mot-la-hai Год назад

    Thank you so much, you are such a dedicated teacher

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

    What is the font settings for your VSCode ?

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

    10 April 2021

  • @fares.abuali
    @fares.abuali Год назад

    Thanks!

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

    HOLY GUACAMOLY THIS GUY IS THE BEZT

  •  4 года назад

    I think it would be better to introduce subscribe method before dispatch because dispatch won't work without calling subscribe method before.

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

      As per my understanding...whenever state gets updated/changed..then subscribe method gets called..so it doesn't matter if it's after/before dispatch..

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

    bro you are only 9 views away from 150k views on this video, i will complete that ... Best redux tutorials i had ever seen on any where on the internet. may you get what you want in your life ... Hare krishana ...

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    Very nice and methodical.

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

    Expected the root reducer to be a function. Instead, received: 'undefined'
    im getting above error

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

    Excellent explaination sir.

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

    Thank you. But you are just making things confusing, unsub = sub?

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

    great explanation step by step

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

    Initial state undefined also

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

    sir, where are you from ???

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

    Understood this in one go!

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

    How the case Buy_cake works is that funtion....

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

      please go through W3School JS switch case! You will get a better understanding! I was also confused first time :)

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

    Best and Easy Explanation.
    Love Your Videos
    Thanks

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

      don't understand line no 32 why const unsubscribe u write ?????

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

    Why can't you do it in class components

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

    guys, what's the name of this theme ? I love this colors

  • @NoumanKhan-ck7vx
    @NoumanKhan-ck7vx 2 года назад

    sir it is giving me error