React Redux Tutorials - 7 - Store

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 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

ความคิดเห็น • 239

  • @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 ?????

  • @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 ?????

  • @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 ?????

  • @vergil_389
    @vergil_389 ปีที่แล้ว +6

    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": "",

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @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 😕

  • @kresimircosic3753
    @kresimircosic3753 4 ปีที่แล้ว +10

    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

  • @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 ?????

  • @FatmavHassan
    @FatmavHassan 8 หลายเดือนก่อน

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

  • @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.

  • @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 ?????

  • @sherifkhattab1313
    @sherifkhattab1313 5 ปีที่แล้ว +8

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

  • @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 ?????

  • @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 ?????

  • @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 ?????

  • @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

  • @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 ?????

  • @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 ?????

  • @dansmar_2414
    @dansmar_2414 2 ปีที่แล้ว

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

  • @spencer6959
    @spencer6959 4 ปีที่แล้ว +2

    Thanks so much! This is the first time the light switched. Superb teacher.

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @reflextions5799
    @reflextions5799 2 ปีที่แล้ว +6

    createStore is deprecated, can you update for configureStore?

    • @yashkhant5874
      @yashkhant5874 ปีที่แล้ว

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

  • @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 ?????

  • @Mot-cong-mot-la-hai
    @Mot-cong-mot-la-hai ปีที่แล้ว

    Thank you so much, you are such a dedicated teacher

  • @manishmohanani654
    @manishmohanani654 4 ปีที่แล้ว +2

    This is on of your best tutorial. Loved the way you teach sir.
    Please make tutorial on React flux as well.🙏🏿

    • @shivanigaddagimath6105
      @shivanigaddagimath6105 3 ปีที่แล้ว

      Hi Manish! Are you looking out for jobs in software development currently? We are in search of developers to join our team.

  • @aakashsharma7653
    @aakashsharma7653 3 ปีที่แล้ว +1

    now i got the idea of redux
    thanks a lot

  • @safalpatel2839
    @safalpatel2839 3 ปีที่แล้ว +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 ?????

  • @brunagobi7393
    @brunagobi7393 3 ปีที่แล้ว

    you really know what you are doing, you are great at teaching...congrats, and thanks a lot

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @sachinfulsunge9977
    @sachinfulsunge9977 ปีที่แล้ว

    Understood this in one go!

  • @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?

  • @zaidsaiyed6076
    @zaidsaiyed6076 4 ปีที่แล้ว

    By far THE best tutorial on redux
    ...keep it up sir😎

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @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.

  • @asmereg
    @asmereg 3 ปีที่แล้ว

    You teach so well. Thank you so much

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @fitnessmodeldiet5350
    @fitnessmodeldiet5350 3 ปีที่แล้ว +1

    very well explained

  • @ericanmolkandulna6628
    @ericanmolkandulna6628 4 ปีที่แล้ว

    Best and Easy Explanation.
    Love Your Videos
    Thanks

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @rohitchaudhari3589
    @rohitchaudhari3589 3 ปีที่แล้ว

    great explanation step by step

  • @swethass9773
    @swethass9773 ปีที่แล้ว

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

  • @shujaali433
    @shujaali433 6 หลายเดือนก่อน

    A pure gem ❤

  • @raghavendrareddy8242
    @raghavendrareddy8242 2 ปีที่แล้ว

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

  • @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 ?????

  • @mohiniraut14
    @mohiniraut14 3 ปีที่แล้ว

    Excellent explaination sir.

  • @fares.abuali
    @fares.abuali ปีที่แล้ว

    Thanks!

  • @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 ?????

  • @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?

  • @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.

  • @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 ?????

  • @costagmc1
    @costagmc1 ปีที่แล้ว

    best in class teacher

  • @luis.carlosrodriguez1561
    @luis.carlosrodriguez1561 2 ปีที่แล้ว +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 ?????

  • @zainuddin1205
    @zainuddin1205 3 ปีที่แล้ว

    This is such quality content...Thank you

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @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?

  • @rakeshkumaryadav1117
    @rakeshkumaryadav1117 ปีที่แล้ว

    What significance of Unsubscribe() method ??

  • @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?

  • @dohyun0047
    @dohyun0047 4 ปีที่แล้ว +1

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

  • @incognito_2512
    @incognito_2512 4 ปีที่แล้ว +1

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

  • @__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]

  • @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.

  • @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??

  • @medmankatowice
    @medmankatowice 3 ปีที่แล้ว

    Very nice and methodical.

  • @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.

  • @golansy2814
    @golansy2814 2 ปีที่แล้ว

    Explanation at the top of magnificence.

    • @vishwajeetyadav4480
      @vishwajeetyadav4480 ปีที่แล้ว

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

  • @shohzotnurullayev2233
    @shohzotnurullayev2233 2 ปีที่แล้ว +1

    very good thanks

  • @tech-tuts
    @tech-tuts 3 ปีที่แล้ว +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 ?????

  • @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!

  • @heninechi8828
    @heninechi8828 4 ปีที่แล้ว +6

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

    • @mizanalharun57
      @mizanalharun57 4 ปีที่แล้ว +23

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

    • @heninechi8828
      @heninechi8828 4 ปีที่แล้ว

      @@mizanalharun57 thanks!

    • @bishnulama7520
      @bishnulama7520 4 ปีที่แล้ว +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...

  • @thequinguyen6904
    @thequinguyen6904 2 ปีที่แล้ว

    HOLY GUACAMOLY THIS GUY IS THE BEZT

  • @arazmammadov9276
    @arazmammadov9276 3 ปีที่แล้ว

    Thank you bro.

  • @chandlerchaudhary1363
    @chandlerchaudhary1363 3 ปีที่แล้ว

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

  • @anithakunapareddy8931
    @anithakunapareddy8931 2 ปีที่แล้ว

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

  • @anushareddy2602
    @anushareddy2602 ปีที่แล้ว

    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

  • @arindam1249
    @arindam1249 4 ปีที่แล้ว

    amazing example

  • @saeedamin9793
    @saeedamin9793 4 ปีที่แล้ว +1

    Thanks a lot for your amazing tutorial, I have seen several of them. There is just one thing that killing me is how you go back and forth through that bright screen and dark one. My eyes just died please make your presentation in dark mode. I usually watch them at night so dark mode would be perfect

  • @esraamohamed5601
    @esraamohamed5601 2 ปีที่แล้ว

    Thank you

  • @GurkiratSingh-pn6yu
    @GurkiratSingh-pn6yu 5 หลายเดือนก่อน

    What reducer function do here ?

  • @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

  • @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

  • @NeelaKrishnaTejatadikonda
    @NeelaKrishnaTejatadikonda ปีที่แล้ว

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

    • @mysterious_billionaire
      @mysterious_billionaire 6 หลายเดือนก่อน

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

  • @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

  • @yeganehaym
    @yeganehaym 2 ปีที่แล้ว

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

  • @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!

  • @MrHalburch
    @MrHalburch 2 ปีที่แล้ว

    Initial state undefined also

  • @olgunkaya_
    @olgunkaya_ 3 ปีที่แล้ว

    What is the font settings for your VSCode ?

  • @musiclovers8488
    @musiclovers8488 2 ปีที่แล้ว

    Really awesome …

  • @ashishsingla4697
    @ashishsingla4697 2 ปีที่แล้ว

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

  • @AAKSHAS
    @AAKSHAS 2 ปีที่แล้ว

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

  • @nazirbahrululum2911
    @nazirbahrululum2911 3 ปีที่แล้ว +1

    Finally, I can speak English indian accents

  • @senangcoding4747
    @senangcoding4747 4 ปีที่แล้ว

    thanks

  • @AbhishekKumar-yi8bu
    @AbhishekKumar-yi8bu ปีที่แล้ว

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

    • @yashkhant5874
      @yashkhant5874 ปีที่แล้ว

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

  • @Praveentechintelugu
    @Praveentechintelugu 2 ปีที่แล้ว

    it is throwing an error for me

  • @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.

  • @sahilbhatti9582
    @sahilbhatti9582 ปีที่แล้ว

    can you make video on using redux with redux saga ?

  • @sasikiran399
    @sasikiran399 3 ปีที่แล้ว

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

  • @thecodelife9855
    @thecodelife9855 2 ปีที่แล้ว

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

  • @genos2719
    @genos2719 2 ปีที่แล้ว

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

  • @vishwajeetyadav4480
    @vishwajeetyadav4480 ปีที่แล้ว

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

    • @warpcore6959
      @warpcore6959 7 หลายเดือนก่อน

      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

  • @javascriptwar9525
    @javascriptwar9525 4 ปีที่แล้ว

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

  • @kavithat6954
    @kavithat6954 หลายเดือนก่อน

    createStore has been deprecated 😢

  • @sandrajsaju6552
    @sandrajsaju6552 10 หลายเดือนก่อน

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

  • @mora7883
    @mora7883 2 หลายเดือนก่อน

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

  • @AAKSHAS
    @AAKSHAS 2 ปีที่แล้ว

    6:33 Summary

  • @vishalupadhayay6391
    @vishalupadhayay6391 ปีที่แล้ว +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.

  • @manee427
    @manee427 2 ปีที่แล้ว

    amazing 👍👍👍👌👌

  • @bijin800
    @bijin800 2 ปีที่แล้ว

    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 :)