React Redux with TypeScript Crash Course - 2021

  Рет қаралды 117,442

Laith Academy

Laith Academy

Күн бұрын

This is a 45-minute crash course aimed to teach you React Redux with TypeScript in great detail.
Second Channel:
/ @laiture123
Git Repo:
github.com/harblaith7/redux-w...
Timelines:
0:00 - Intro
1:25 - Create a TypeScript React App
2:57 - Typing Reducers
13:44 - Organizing Files
22:31 - Typing Action Creators
32:00 - Typing Dispatch

Пікірлер: 130
@aeganaden
@aeganaden 2 жыл бұрын
Man, your channel deserves more subscribers. The level of clarity that you give deserves 10million subscribers. Anyways, I'm so glad that i discovered your channel, will support this channel always! Keep up the good work!
@boswellorendain3355
@boswellorendain3355 2 жыл бұрын
Thank you so much transitioning from react js w/ redux to react ts w/ redux had been hard but this video made everything clear. Very well put explaination and easy to understand :D
@als5321
@als5321 3 жыл бұрын
Your channel is a hidden gem. So many cool topics you cover. Don't stop grinding you're gonna blow up.
@RampageV1d30s
@RampageV1d30s 2 жыл бұрын
Thanks a lot dude! Documentations and articles makes it so complicated but you made it so simple
@sarcasticdna
@sarcasticdna 2 жыл бұрын
Woah ❤️ this video is awesome, happy that you didn't start explaining what Redux is in this video again 😄
@MrAndykofi
@MrAndykofi 3 жыл бұрын
Thanks very much, I used this to refresh my react types experience, very clear.
@arkmy
@arkmy 2 жыл бұрын
The best redux tutorial I have seen (I saw many!). You got a new subscriber.
@Balistick51
@Balistick51 Жыл бұрын
Amazing guide. Really helpful to understand how redux works with react and typescript. Thank you!
@spunk707
@spunk707 2 жыл бұрын
Thank you very much. First tutorial that actually works, and it was with typescript! very clear explanation of everything...
@sujantkumarkv5498
@sujantkumarkv5498 Жыл бұрын
The quality is actually so freaking good :)
@lsowein
@lsowein 2 жыл бұрын
Another very useful tutorial.Thank you! You are a great instructor!
@itsmiemusic
@itsmiemusic 3 жыл бұрын
Thank you for you content--your channel's helped me SO much! Easy to follow and understand & very thorough 👏🏼 I've watch this video and the two others you recommended, and I'm blown away by how quickly I'm picking up what you're putting down! You're a great instructor, thanks again!
@itsmiemusic
@itsmiemusic 3 жыл бұрын
Would you be able to create a crash course on using React Redux Typescript to build an Electron app?
@laithacademy
@laithacademy 2 жыл бұрын
Thanks for the kind comments. Honestly, don't know any Electron, but if I learn it, I'll make a video about it.
@ashwinnair9862
@ashwinnair9862 2 жыл бұрын
Thanks, for this tutrial looking forward to sagas as thunk can be a pain in some situations.
@nnamenearinze6086
@nnamenearinze6086 2 жыл бұрын
This was a perfect refresher I wish I could like and sub multiple times. Thank you!!!!
@diegosk8bt
@diegosk8bt 2 жыл бұрын
I came from vue world and I'm able to digest this content really easily, thanks.
@svetoslavivanov8871
@svetoslavivanov8871 Жыл бұрын
I just starting learning react and redux. your videos are great!
@ahmedkrdzalic4425
@ahmedkrdzalic4425 2 жыл бұрын
It would help a lot if you give us the GIT repository to have a reference when it comes to bug handling. Or maybe at the end of the tutorial, to show all code in a few seconds so we can see where we have made a mistake. Btw, thank you for this.
@arcosd63
@arcosd63 Жыл бұрын
Thanks! Pretty good video, I like how you explain the material.
@iamaakashbasnet
@iamaakashbasnet 3 жыл бұрын
You're a gem 💎! Thanks a lot man! 🤩
@fatihcamgoz
@fatihcamgoz 2 жыл бұрын
Great tutorial! Liked and subbed! (Please do a long video on a big scale project for Redux Typescript)
@hugo057855555
@hugo057855555 Жыл бұрын
Nice video, now I understand react and redux with typescript
@dominiccohen7576
@dominiccohen7576 Жыл бұрын
Great tutorial thank you. Only question I have is about using index files for organisation. This is not the place for discussion about best practice naming conventions for Interfaces and their Implementations, or deep concepts of object orientation. Yet someone new to TS concepts may get more benefit if the interfaces were placed in a file named more appropriately, such as accountActionInterfaces or something similar.
@codelightsparkles2403
@codelightsparkles2403 2 жыл бұрын
Thank you for the tutorial! you rock!
@learnsmart1812
@learnsmart1812 3 жыл бұрын
Serious awesome and I loved way of explanation is good 👏.
@user-ms4cs7vx9t
@user-ms4cs7vx9t 2 жыл бұрын
This video helped me complete the test assignment get my first job 😅
@xaxaFilms
@xaxaFilms 2 жыл бұрын
very informative. thank you!
@andrzejsotnikow7494
@andrzejsotnikow7494 2 жыл бұрын
Thank you for this tut!
@garikmelqonyan6011
@garikmelqonyan6011 Жыл бұрын
Many thanks! Good tutorial.
@felipemiguel5581
@felipemiguel5581 2 жыл бұрын
Man, Thank you so much. It's so helpful me, Thank for this content.
@fares.abuali
@fares.abuali Жыл бұрын
This video is a treasure 🪙 Concise and informative. Thank you so much.
@mashoodkiyani3992
@mashoodkiyani3992 2 жыл бұрын
that is just beautiful
@jurajdurej
@jurajdurej Жыл бұрын
awesome video my friend :D thank you
@preciousbey
@preciousbey Жыл бұрын
29min in and just wow 😲 typescript is a bit tricky. This clears things up
@khertgeverola175
@khertgeverola175 2 жыл бұрын
Good tutorial. I suggest your next tutorial would be react-redux typescript using redux toolkit.
@codewithsandip8397
@codewithsandip8397 2 жыл бұрын
This is hlp full for begginer Thank You So Much ::))
@jaicarey7023
@jaicarey7023 2 жыл бұрын
Exceptional video mate! I was struggling with applying typing to redux, this was very helpful :) Edit: I will say I personally really dislike calling nearly every file index.ts, very easy to get lost in that kind of environment... But I do really like the way you implement redux as hooks? From the course I did I used the connect method and implement map state to props and map dispatch to props. I am tossing up which is easier to read.
@melindamurillo4680
@melindamurillo4680 2 жыл бұрын
Thanks for the video. Did you ever create a part 2 to this video ? I couldnt seem to find one
@sohailhaqyar3949
@sohailhaqyar3949 2 жыл бұрын
Good stuff man.
@Julian-oy7dy
@Julian-oy7dy 2 жыл бұрын
This lecture helped me a lot. Thank you. I wish there was also a REST service course using TypeScript. This is the function for the client to log in to a specific admin page and modify personal information.
@laithacademy
@laithacademy 2 жыл бұрын
I have a Nest crash course that uses TypeScript to create a REST API
@rajnishkalwar3231
@rajnishkalwar3231 2 жыл бұрын
Thanks for very informative video one of the best video on youtube...
@ol1175
@ol1175 2 жыл бұрын
Best one!!!
@RAJUBHAI-ww7em
@RAJUBHAI-ww7em 8 ай бұрын
laith you thanks a lot mate
@skydivey
@skydivey 2 жыл бұрын
Great explanation.
@baiweichen7521
@baiweichen7521 2 жыл бұрын
learn a lot. thank you.
@mmacuts7527
@mmacuts7527 2 жыл бұрын
Thanks for this
@mariorios8827
@mariorios8827 2 жыл бұрын
Nice!! Thank you
@korndev6862
@korndev6862 2 жыл бұрын
great tutorial
@captainprogramming
@captainprogramming 9 ай бұрын
Thanks for making video
@TheMakeupmonika
@TheMakeupmonika 3 жыл бұрын
l love your content !!! keep on going , please ...
@goranqaqnass5867
@goranqaqnass5867 2 жыл бұрын
Thanks!
@IkraamDev
@IkraamDev 2 жыл бұрын
Thank you ليث حرب
@ameerhamza-pw1vq
@ameerhamza-pw1vq 3 жыл бұрын
good explanation
@SamyarBorder
@SamyarBorder Жыл бұрын
This video is great ... 😀😀
@RavindraSingh-lp9pl
@RavindraSingh-lp9pl 4 ай бұрын
great video..
@davidho1258
@davidho1258 2 жыл бұрын
you dont need to import from /folder/index.ts. /folder would do. VScode will assume you want to import from the folder's index file instead of clicking to autofill imports, you can press tab or enter. You may have to change the settings in your VSCode. Add a selector to your store called bankSelector. export const bankSelector = (state: State) => state.bank
@OSCAR-CH
@OSCAR-CH 2 жыл бұрын
Hey thanks a lot bro. What pattern are we using here with action-types, actions and reducers folders?
@shineLouisShine
@shineLouisShine 4 ай бұрын
Teach me anything! ...Although, in this case, at the end of the video Some conclusion of the entire structure and flow of the app - Wouldn't be a mistake. Thanks a lot :)
@bluediu1714
@bluediu1714 2 жыл бұрын
Thank you :)
@hasancheraghi2800
@hasancheraghi2800 2 жыл бұрын
Hey. thank u so much
@Atif1702
@Atif1702 2 жыл бұрын
You are a mentor to me but just few points: 1. You don't need types for redux-thunk as Redux Thunk provides its own type definitions. 2. You can put the interfaces in "__.d.ts" files and you don't have to import or export it then
@Anothy
@Anothy 2 жыл бұрын
For #2, you can but should you?
@Atif1702
@Atif1702 2 жыл бұрын
@@Anothy why not?
@ankitvasita
@ankitvasita 3 жыл бұрын
very well explained....please bring one project with react - redux with typescript.
@LoveisHell85
@LoveisHell85 2 жыл бұрын
Yes, I would love to see this. Would pay money also
@amjadshadid90
@amjadshadid90 2 жыл бұрын
thanks a lot
@gozhira9520
@gozhira9520 2 жыл бұрын
Awesome! Thank you for sharing, very useful, I only have one question, if i have more than one reducer what would be the file organization? Thanks.
@137dylan
@137dylan 2 жыл бұрын
You'd do the same thing and then import all reducers to the root reducer file where they're combined. Or you would use Redux Toolkit which solves this multiple reducer problem by creating "slices"
@dennisgonzales9521
@dennisgonzales9521 2 жыл бұрын
thanks!!
@mohammedjamal4759
@mohammedjamal4759 2 жыл бұрын
Thank you so much for this course, Can you please Make a new Redux with Typescript for eCommerce store?
@sivsovanpanhavorn6296
@sivsovanpanhavorn6296 2 ай бұрын
Awesome
@EverAfterBreak2
@EverAfterBreak2 3 жыл бұрын
Algo comment, i'll watch later
@rangabharath4253
@rangabharath4253 3 жыл бұрын
awesome
@monkeystylle
@monkeystylle 3 жыл бұрын
thanks for the tutorial. can you make Redux saga..
@dylanstandridge3201
@dylanstandridge3201 Жыл бұрын
Would you recommend passing your dispatch down into your components whenever your setting up your app with someone like react router dom?
@andrewspatrick2452
@andrewspatrick2452 2 жыл бұрын
if you do a e-commerce project with TS + react + redux would be amazing
@gagan987
@gagan987 9 ай бұрын
Yes please make a video of it because I'm try to use a action creator inside a action creator but I'm getting errors so please make a video about it. To give more detail about my problem I'm trying to build a todo app with redux and typescript so after updating (dispatch(updateTodo())) a todo what i would do without typescript is that i would call getTodos action creator (dispatch(getTodos())) which would fetch all the updated todos but with typescript I'm getting errors
@romimaximus
@romimaximus 2 жыл бұрын
at 20:00, everytime that i install a package, than i have to install this "@types" also....? and does the typecript wesbite has a list of this packages ?.. by the way awesome tutorial, thank you
@MohammadAApu
@MohammadAApu Жыл бұрын
how to dispatch multiple actions inside action creators in this way? like if I add new item then I would like to sum total (of those items) to a separate property in store)
@Devilman91
@Devilman91 Жыл бұрын
Hello, course is awesome but can you show or explain how to dispatch single action without bindActionCreators? In practice, in real projects dispatch is used by many components. thanks
@RyanRhoades-gx4mc
@RyanRhoades-gx4mc Жыл бұрын
bit late to the party here but just wanted to check in. Is the possibly undefined error coming from making the payload optional rather than having a specific interface for each action type? When we make the payload optional, even with multiple interfaces, the possibly undefined error comes back. I am assuming due the possibility that now the payload may not be provided and would then cause the undefined error.
@christahegedus332
@christahegedus332 2 жыл бұрын
I can't find the next video when you get this app to work. Can you display a link to it? Thank you.
@codewar6708
@codewar6708 Жыл бұрын
on 25:46 you use default Disptach type, which not include thunk type so avoid this using, AppDispatch = typeof store.dispatch.
@igdev6095
@igdev6095 2 жыл бұрын
Redux - axios - typescript, I hopefully you will do that! Thanks before
@daakuish
@daakuish 2 жыл бұрын
What if we want to export the actions constants as "export const DEPOSIT = 'deposit'" *instead of enum* and use as interface DepositAction { type: DEPOSIT, payload: number } If I do this, I get the error " 'DEPOSIT' refers to a value, but is being used as a type here".
@surveillancecameratada63
@surveillancecameratada63 2 жыл бұрын
hmm ... (src/state/reducers/bankReducer.ts) ... default: // slove Error: The slice reducer for key "bank" returned undefined during initialization. return state
@gandalfgrey91
@gandalfgrey91 2 жыл бұрын
At 34:20 my app failed to launch, I've been following everything exactly up to that point, triple checking all my code with the github repo. I got a a few errors in console "Invalid Hook Call", "Cannot read properties of null (reading 'useMemo')" and "The above error occurred in the component: Provider". Anyone have any clue what issue I'm getting?
@ZeeshanAli-kc3zc
@ZeeshanAli-kc3zc 2 жыл бұрын
way underrated video
@user-oh4xi2xb2d
@user-oh4xi2xb2d 2 жыл бұрын
will be great to know how to add redux dev tool
@Quicknuggets
@Quicknuggets 2 жыл бұрын
@28:18 Its still not catching the error for bankrupt .. since bankrupt should not have any payload.. how can this be fixed?
@jeffgasparini5927
@jeffgasparini5927 3 жыл бұрын
Hello, sorry for my english, im french developer, very good tutorial ! ty
@bloodzz4813
@bloodzz4813 2 жыл бұрын
Don't worry ur English is good
@MrSociety404
@MrSociety404 3 жыл бұрын
Wonderful video ! Please can you do a crash course for API framework
@laithacademy
@laithacademy 3 жыл бұрын
Like Express JS?
@MrSociety404
@MrSociety404 3 жыл бұрын
@@laithacademy yes why not, I don't have any skills in this, I actually use a "API" with a php file to communicate with my database, so I want to learn something new and something good. (Sorry for my English I'm Belgian)
@MrSociety404
@MrSociety404 3 жыл бұрын
@@laithacademy I'm really interested to meet someone who have skills and who explained well like you, if you can please add me on discord, i'll will be glad, MrSociety404#5268
@rodolforaquion166
@rodolforaquion166 2 жыл бұрын
Just a question because I'm a newbie: Is this the traditional way of using react-redux? I've watched Mark Erikson's video about Redux and he's using reduxjs-toolkit. So I'm just curious if I'm following the "modern" way of doing react-redux. I've also noticed there are no slices created that's why I wondered.
@CapeSkill
@CapeSkill 2 жыл бұрын
This is a classic implementation of redux, but you can honestly use both. RTK(redux toolkit) eliminates a little bit of the boiler plate, but you can use this type of implementation in modern react applications as well to be honest.
@DeepakGupta-pz4fx
@DeepakGupta-pz4fx 2 жыл бұрын
Can you make one video redux saga
@marcinbaazy1692
@marcinbaazy1692 2 жыл бұрын
thanks! but why are you using redux-thunk in all actions? why not just return plain object instead of function with dispatch? is that something related with redux with ts?
@137dylan
@137dylan 2 жыл бұрын
You are correct there was no need to add the thunk middleware in this tutorial as the actions were synchronous. However the same template/architecture can be used for async calls, such as to an API or if using Firebase etc. (anything with promises)
@saisashankchavaly2121
@saisashankchavaly2121 2 жыл бұрын
is there any git repo for this?
@designcoderdev3080
@designcoderdev3080 2 жыл бұрын
can you make nuxt ts vuex vue 3?
@macos-brasil1814
@macos-brasil1814 2 жыл бұрын
great but sometimes (unless is a biiiiig project with many people on the team) its just too much creating functions to check the type of the type of the type of the type of the checker function that check the other functions which will check if you misstype "order" in the parameters.
@tarekhammami2350
@tarekhammami2350 2 жыл бұрын
Thank you very much for this video ! But, unfortunatly, I have a problem running Redux DevTools Chrome extension with this setup. Can anyone please suggest a solution ?
@abdelnacerr
@abdelnacerr 2 жыл бұрын
This works for me: import {compose} from "redux" compose( (window as any).__REDUX_DEVTOOLS_EXTENSION__ && (window as any).__REDUX_DEVTOOLS_EXTENSION__() )
@pauljmorton
@pauljmorton 2 жыл бұрын
So when I do that "npm install" stuff, is it redux-thunk or react-thunk? You say redux-thunk but you typed react-thunk. Your stuff installed fine with react-thunk. My stuff also installed fine even though I went with redux-thunk.
@surajnair2617
@surajnair2617 2 жыл бұрын
react-thunk gave me dependency issues, redux-thunk worked..thanks
@clrbrk9108
@clrbrk9108 2 жыл бұрын
This is a great video and I learned a ton, but a fair warning to viewers: this is NOT modern Redux implementation. Which I learned the hard way during a code test written with modern Redux implementation :(
@youneshenni5417
@youneshenni5417 2 жыл бұрын
do you have a resource for that?
@rabiyabasri9276
@rabiyabasri9276 2 жыл бұрын
I have setup the redux by watching your video.. Could please tell where i should make api call.. I tried and made api call in action creator.. But in response i get function.. () {return dispatch (actionCreator.apply(this.arguments)) } Can provide a suggestion on how to make api and get response using redux with typescript:)
@haroldmaussa
@haroldmaussa 3 жыл бұрын
hi, please the repository
@028-manikandan3
@028-manikandan3 Жыл бұрын
You put reactnative with typescript projects more 🙏🙏🙏🙏
@ddikodroid
@ddikodroid 2 жыл бұрын
redux toolkit and react query with typescript(?)
@anabuch5986
@anabuch5986 2 жыл бұрын
Thank for your video. I am having a compile error at "export * as actionCreators from './action-creators/index';" It seems to be a bug. I don't find the solution. The error is the following: You may need an additional loader to handle the result of these loaders
@munteanuoctavian7797
@munteanuoctavian7797 2 жыл бұрын
I have this error too
React with Redux Toolkit Crash Course
1:09:05
Laith Academy
Рет қаралды 98 М.
React Redux (with Hooks) Crash Course
48:00
Laith Academy
Рет қаралды 207 М.
How to open a can? 🤪 lifehack
00:25
Mr.Clabik - Friends
Рет қаралды 10 МЛН
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Рет қаралды 4,8 МЛН
Não pode Comprar Tudo 5
00:29
DUDU e CAROL
Рет қаралды 82 МЛН
TypeScript Course for Beginners - Learn TypeScript from Scratch!
3:16:40
Node & React Redux Tool Kit with Typescript
1:44:13
Arturo Filio Villa
Рет қаралды 11 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
React with TypeScript Crash Course
1:07:05
Laith Academy
Рет қаралды 237 М.
TypeScript Crash Course
1:34:33
Laith Academy
Рет қаралды 14 М.
HTTPS, SSL, TLS & Certificate Authority Explained
43:29
Laith Academy
Рет қаралды 42 М.
The Golang Crash Course
1:43:20
Laith Academy
Рет қаралды 13 М.
The Nuxt 3 Crash Course
3:45:00
Laith Academy
Рет қаралды 94 М.
Redux Tutorial - Learn Redux from Scratch
1:34:53
Programming with Mosh
Рет қаралды 1 МЛН