Redux and NextJS 13 Tutorial | Redux Toolkit Tutorial With Next 13

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

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

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

    The first 1,000 people to use the link will get a 1 month free trial of Skillshare skl.sh/pedrotech06231

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

      Thanks Pedro

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

      I am experiencing an issue where I am unable to make progress due to an error. Here is the error message:
      "Unhandled Runtime Error
      Error: Could not find the react-redux context value. Please make sure that the component is wrapped in a ."

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

      Your theme

  • @shahidshafi1227
    @shahidshafi1227 ปีที่แล้ว +49

    I spent the entire day working with Redux in my company's React project. I was feeling a bit confused about how to set it up in my current Next.js 13 project, but then I stumbled upon this helpful video. It was a pleasant surprise! 😊

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

      Glad I could help!

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

      ​@@PedroTechnologies is it possible for you to provide the link to the Github repo, as I like to look over the code in a bit more detail. You say in your video you link to it, but I don't think it's there, only the one from your NextDeploy video. Thanks!

    • @SURAJKUMAR-gn7ep
      @SURAJKUMAR-gn7ep ปีที่แล้ว

      Hi sahid I want your help in nextjs so will you help me ?

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

      what company do you work in?

  • @giwargis01
    @giwargis01 9 หลายเดือนก่อน +1

    I'm a full stack web developer, I learned redux from documentation itself It might be confused when you learn it from there. But this video save you a lot of time, and explains redux pretty simple and cool, good job!!

  • @clasesutnfrc8699
    @clasesutnfrc8699 22 ชั่วโมงที่ผ่านมา

    06:49 Reducers
    07:08 Reducers | Access to the state's values
    08:53
    12:19 Reducers
    13:11 Reducers | logOut
    16:18 How to use slice
    16:49 How to use slice | Add slice to store
    21:23 Consume provider
    22:32 useDispatch
    23:14 Login
    24:48 useSelector
    25:02 useSelector

  • @hakanayhan7843
    @hakanayhan7843 หลายเดือนก่อน +1

    the content is clear and well explained. thank you

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

    Pedro, mucho respect from Greece! you are my favourite tech youtuber

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

    I read bunch of articles and watched a lot of videos this is the simplest and most structured video to use redux wit nextjs I really recomment it Thank you !!

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

    I took a challenge that I will be creating e-commerce website from scratch with out knowing much about website development. I saw this video and was able to build a mockup in a day. Thanks bro

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

    I was looking for this just yesterday. I also watched your last redux tuts. Good job!

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

    I am so grateful for your work Pedro. Your videos have been so helpful, and you are the only one I have found that is making useful tutorials for Next.js 13 app router. Around the time I ask myself a question, you made a video. Thank you so much!!!

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

    Came here cause I was getting errors trying to implement the Provider on NextJs. Thanks man.

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

    A massive thanks to you Pedro!.I always thinking the day I finish all of your react and mern tutorials I think i would become a better developer.Can't wait to finished learning all of your tutorials.I know most of the people can learn directly by reading some docs.But i'm not that kind of person.English is not my first language tho.But i saw your channel last 6 months ago.I finished your React series.And i can feel that your ways of teaching made my thinking of programming logic easier.I'm currently at my 3rd yr CS Uni.I want to say so so so thanks to you Pedro.Have a good day 🎉❤

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

    Thank you. I could not find how to use the Provider correctly in the new version and your video helped me

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

    Great video bro, thanks for keeping it simple and not over complicating

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

    Thank you so much. I've spent days scouring the internet looking for a comprehensive guide and here it is. I have a question though, in trying to fetch data from an API, how would I go about that?

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

      I have the exact same question. What did you end up doing?

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

    Shouldnt we mutate values within reducers? As its using immer?

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

    great video man,you teach so well

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

    Respect. Easy and clear.

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

    Great tutorial. Having said that, it makes me love Zustand even more. So much boilerplate for something that should be so simple.

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

    activated the notification belt, you saved me hour of debugging !

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

    one of the best video of redux, so easy tech

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

    I am experiencing an issue where I am unable to make progress due to an error. Here is the error message:
    "Unhandled Runtime Error
    Error: Could not find the react-redux context value. Please make sure that the component is wrapped in a ."

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

    I was trying to find out the bug in my redux setup for hours, it was working in the base path "/" but not on "/login" and then I found your video. The issue was I forgot to put "use client" in the login page.
    Thank you

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

    I really learned a lot , I would love it if you make a part 2 where you explain some advance redux concept...

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

    Would Redux in Nextjs not be overkill? Since libraries like Zustand and Jotai make state management so easy, unless maybe if your interviewing for companies with this stack it is good to know?

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

      Yeah I prefer Zustand so easy to use

  • @HaoZhao-o3g
    @HaoZhao-o3g ปีที่แล้ว +2

    But we can only use client components in this video.

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

    great work man

  • @horix-sound
    @horix-sound 9 หลายเดือนก่อน

    in this case your web-site will not be indexed by search robots, right? I don't understand as well how indexing works

  • @Adam-oq4xq
    @Adam-oq4xq ปีที่แล้ว

    perfect timing bro thank you

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

    thanks bro you saved my day

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

    can i upload to store by ssr not client side and use on client side?

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

    Thank you very much! Explained so well.

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

    If you have to declare pages to "use client" is there any point of using next.js?

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

    If we can use redux only with the client side , how can we use it to handle backend tasks and set that data to store?

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

    fantastic video my guy

  • @Horlar-t2t
    @Horlar-t2t ปีที่แล้ว +1

    Wow bro I saw this first today and this is what I have been searching for😮

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

    Which Icon extension are you using?

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

    Thank you.very clear!!! But what if you refresh the page? The state is lost. How would you persist it?

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

    This all happens on the client side, do you know any possible way to implement it using the serverside components?

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

      redux is built only to deal with client component

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

    Why do so many bloggers show how to setup next + RTK, but no one shows how to get next ssr to work with RTK ? If you wrap your the children in layout you don't get the markup, how do crawlers can read your website?If you wrap your children in a layout, you don't get the markup. How can crawlers read your website for seo? If you don't need such things then you should use simple react as more lightweight framework

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

    What is the point of using app router if we are loosing the features of server side rendered pages if we make it use client?

  • @AlexSmith-ms9xb
    @AlexSmith-ms9xb ปีที่แล้ว +1

    Thank you so much! Please consider making a video with Zustand :)

  • @vigneshravichandran9542
    @vigneshravichandran9542 26 วันที่ผ่านมา

    Bro, Can i use redux in a server component in next js

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

    New to all this. But why nest your states under a 'value' property?

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

    DO u have a github link to this project? I searched in your repos and couldn't find it

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

    great tutorial!

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

    thank you was really helpful. Is it common to use next13 with mobX instead of redux, i am asking because i didnt find any tutorial about combining next 13 with mobX

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

    If we had a password field too. How can we handle multiple values coming from the components? I mean we would have pass those in the login function?

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

    I am going to start learning react js from your playlist.
    I hope that would immensely help me

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

    What is your theme Vscode?

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

    Hey Pedro, nice video and that helped me a lot to use redux with my new next project. One simple dubt of me that if I use the use client in top of the provider component and it wrap everything in layout.tsx file, will the whole app be rendered in the client? as all of the children of client components render in the client. I may be wrong, can you kindly fix my dubt?

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

      I have the same dubt, is this the correct way to do it?

  • @שקדגולן-ב7ר
    @שקדגולן-ב7ר ปีที่แล้ว

    I left with so many questions about how to divide the actions and reducers to different files like I do in regular redux - I mean why did you write it all in one file? its not scalable
    Can you comment on this please?

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

    in my case, dispatching from /login but on /dashboard state is not coming

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

    Thankyou, this video is amazing

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

    But How do I solve the caching ? How would I store my state in client side since this code is rendered in server side ? I know we could use localstorage on the app directory , but how to use it on redux store itself ?

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

      good question, did you find any possible solutions?

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

    What will happen if you move to another page? the state in the store will be lost. How to handle that?

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

    could you please add the redux persist using this same project ?

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

    Can u make a room tour video ?❤❤❤

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

    how we can update value from rsc component why its not working

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

    Thanks a lot man :D

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

    Thank you for your hard work! All your videos are very useful for us self-taught developers :)

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

    this video is very helfull👍👍🔥🔥

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

    Thanks for the video.
    Can anyone please explain. Can I use Redux Store globally (it works only in client components) and use Server Components at the same time (because fetching data etc is only available in server components e.g. supabase). And it looks if I wrapped layout with provider - all nested components can't be server components (only client components)... so means no server components at all... or am I wrong?

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

      if I wrapped layout with provider - all nested components can't be server components - its not true, u can read nextjs docs for this thing

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

    can anyone tell me which theme he is using for vs code?

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

    Hi Pedro! I found this video so interesting and after I tested it on local project, I've noticed that on "npm run build" the operation fail cause to "Cannot destructure property 'store' of 'useReduxContext(...)' as it is null."
    I've already searched this error but with no response and now I don't know how to continue it.
    Have you any suggest? What kind of Next version do you use? Thanks 💙

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

      ya when you try to call useAppSelector in layout.tsx ,this problem will arise because we are trying to call before wrapping. But iam wondering to manage that data in layout, i need that value inside layout. Iam stuck

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

      ​@@nilin6769Hey man, did you fix it?

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

      @@samuelvalentine7846 we can use that in layout.tsx because it is like index.js in react. Change your folder structure instead

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

    bro where is the GITHUB repo?

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

    Thanks so much bro. Your explanations always perfect. Typescript type for store that we exported is like a magic number for us.. how did you know this action was required?

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

    can you make a video on how to use the rtk query in ssr?

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

    Thank's fo the video.

  • @the-LordXNobx
    @the-LordXNobx ปีที่แล้ว

    great tutorial, but you can just separate typescript tutorial and the redux. confusing newbie like me😅

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

    Thank you!!!!

  • @DavidLucas-ci2fy
    @DavidLucas-ci2fy ปีที่แล้ว

    I am facing an issue when I try to build the application using redux. Like I have this structure:
    | app
    page (render the components header and foodcard)
    layout
    | components
    | header (use redux data)
    | foodcard (use redux data)
    and the build return this error:
    [ ] - info Generating static pages (0/3)ReferenceError: Cannot access 'cart' before initialization
    But when I move the code from each component inside the page, it works the build :s
    Can someone help me out?

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

    Helo pedro, i am trying to set middleware using redux based on local storage or state from reducer but i don't find to handle this... Can you help me or anyone can help me?

  • @ІВАНдобрий-г5б
    @ІВАНдобрий-г5б ปีที่แล้ว

    thank you guy

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

    Thanks!

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

    Thank you

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

    I really lost whole of my day just for looking tutorials about nextjs 13 redux
    thank you

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

    But this way we disable SSR and basically all lose all benefits of next, dont we?

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

    I was expecting this tutorial to use next-redux-wrapper so I was very dissapointed to find out you just ended up with "use client", why bother with nextJS then ?

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

    How to use RTK Query and data caching with new 13 🙂

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

    thunks topic missing

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

    Bruh we really need a graphQl with Next 13 tutorial, too

  • @shehwar-dev
    @shehwar-dev ปีที่แล้ว

    Great tutorial, thanks! One Qs, If we wrap the layout children with a Redux Store provider which is a client side component ( using "use client" ) then will it make all of its children CLIENT SIDE ? will all of my components will be rendered ONLY on CLIENT SIDE? Can someone please confirm this, I'm confused in this concept. Thanks!

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

      yes

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

      NO!!

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

      @@praiseoshilim1006 No man, if there is {children} in 'use client' file, children can be rendered on server as well

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

    nice video dude! your linkedin profile url is broken actually, can u put here or update? I'm from brazil too (vamo dominar a gringa 👊)

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

    You're awersome!!!!

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

    hey pedro my UI components in the Layout page have gotten all messed up when i wrapped the reduxProvider ,how do i fix it edit: i had to rebuild my react project to fix it ...not a tutorial problem 👍😹

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

    This video would have helped me 2 weeks ago 😅😅

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

    It is very similar to the implementation in react ( javascript )

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

    Could you make video about full structure for real work project such as make project with Nextjs + redux + mongo + tailwind + prisma + auth token ? Thank you

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

    I don't think actually we need stat management in next js

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

    nice Video . What about Zustand (i think its better than redux )

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

    where is source code?

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

    These updates be like, NextJS and React are basically turning into PHP so every react developer be like, HAS TO COPE.

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

    I didn't start next js yet but i came to give our channel the like and comment that it deserves ❤

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

    Redux seems too much unnecessary steps. I moved to recoil. 😅

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

    wish i was a footballer i wont be struggling to understand all this????

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

    using 'use client ' destroy your whole purpose of using next js which is ssr

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

      Then how will you be using react hooks without "use client" ?

  • @JonStaples-c6q
    @JonStaples-c6q 6 หลายเดือนก่อน

    This dude is talking about using Typescript, because you should, yet he is using Redux for auth. How bad can you be? So elementary.

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

      What is your advice? Im really asking for help, I'm back to doing development, was doing react since react 13, over 16 and 17. Was using Redux with whole boilerplate and all wrapper setup. What is your advice for today? I mean, I can pass with using Context, but what do you suggest?

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

    Just some important info for you. I thumbed down all the videos as you can't watch them at all for any peiod of time for learning as you advert placement is all the time. Not worth wasting a subscription on your channel.

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

    too much bla-bla