Typescript for React and MobX From Beginners to Masters

  Рет қаралды 43,134

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 76
@CodingNuggets
@CodingNuggets 3 жыл бұрын
I haven't looked into MobX because I haven't had a need for it and haven't had any request for it in projects. Still good to know, so thanks for giving me a quick look.
@CodingNuggets
@CodingNuggets 3 жыл бұрын
Hey hey! Thanks for the pin Jack. I was just giving you accolades in Jesse's (codeSTACKr's Discord) for the weekly news inclusion. Love your content and watching you grow. Growing with you my friend. 🙂
@ngochunglongnguyen4523
@ngochunglongnguyen4523 10 ай бұрын
OMG you're a great teacher. You helpt me learn MobX in under 15mins while Redux and Redux toolkits took me at least 2 days to go through all the practical implementation. That is really productive.
@clins94
@clins94 15 күн бұрын
this is such a nice little video for introducing mobx ! thank you. i'm going to share it with the new hire since we will be using it on the project ❤
@НикитаКальнов-л8ш
@НикитаКальнов-л8ш 3 жыл бұрын
You deserve bigger audience with such a content! Thank you a lot for great introduction to MobX!
@sarthakshah2236
@sarthakshah2236 3 жыл бұрын
exactly
@craigjohnson8279
@craigjohnson8279 3 жыл бұрын
This is awesome, thanks Jack. I love that you did some Fetch requests as well! :)
@luisalejandropena5063
@luisalejandropena5063 3 жыл бұрын
I was a little bit scaried about using Mobx but you explained so easy that I want to implement it. Thanks
@jherr
@jherr 3 жыл бұрын
Nothing to be scared about, MobX is good stuff.
@SachinDolta
@SachinDolta 2 жыл бұрын
This is top notch high quality channel
@MaulanaRamaIbrahim
@MaulanaRamaIbrahim 2 жыл бұрын
Thankssss Jack, your videos are really helpful! I hope you continue to make more!
@sarthakshah2236
@sarthakshah2236 3 жыл бұрын
big thank you for the video. i can now efficiently use it in my projects
@Freedom_Code
@Freedom_Code 3 жыл бұрын
thx Jack , i'm working React developer , and i 'm beginner in TS and MobX, offcourse your code's strange for me, but i repeated my-self and it's greate. Good Luck and be healthy !
@Raubritterr222
@Raubritterr222 3 жыл бұрын
That SATURN V is gorgeous!
@HillelGarciaAustria
@HillelGarciaAustria 3 жыл бұрын
Very well explained, thank you! I like the way you go straight to the point and the use of pure functions. You have +1 subscriber.
@rizwanatta7845
@rizwanatta7845 3 жыл бұрын
i was struggling with mobx to handle a small app as I am more inclined towards doing all with redux! but had to had it in this small all! so MOBX and your tuts helped! thanks
@cappuccinopapi3038
@cappuccinopapi3038 3 жыл бұрын
This is such a quality tutorial, great job!
@josemfcheo
@josemfcheo 3 жыл бұрын
Just what I needed! Thanks!
@afganhalilov1442
@afganhalilov1442 2 жыл бұрын
Hi Jack, thanks for your videos, they are much helpful and superb! Hope you will continue to make so useful stuff
@lactobacillo79
@lactobacillo79 3 жыл бұрын
Hi Jack, thank you so much for your videos. I love MobX too and MST, but in this example your are modifying directly some observables, meanwhile in the MobX documentation it's highly adviced to modify the observables properties using an action, what's your opinion about that? Regards...
@jherr
@jherr 3 жыл бұрын
In larger applications you definitely should use actions to mutate the state instead of directly mutating it.
@BlackSlimShady
@BlackSlimShady 11 ай бұрын
Amazing content, thank you!
@Elantry
@Elantry 3 жыл бұрын
Thank you! I've spent a long time on this. Easy as soon as it works :-)
@jherr
@jherr 3 жыл бұрын
Aint that always the way? 😀
@antongron
@antongron Жыл бұрын
Thanks a lot for the video
@DOMAN89
@DOMAN89 3 жыл бұрын
Hi Jack I have some suggestion: 1. In your case you can omit the returning type of functions like in addTodo, because TypeScript is able to infer the type. 2. Maybe would be nice to show that, we can create for example: type AddTodo = (todos: Todo[], text: string) => Todo[]; and use it in this way: const addTodo: AddTodo = (todos, text) => [ .... But of course very nice video and thumb up :)
@TheScottShepard
@TheScottShepard 3 ай бұрын
The return type helps to make sure you don’t make mistakes internally to the function before returning the result. It’s a good idea to create a type contract before you write your logic. This is the same mindset as test-driven development where you first decide what your outcomes should be, then code your implementation to achieve your desired outcome. Happy coding!
@DiegoBM
@DiegoBM Жыл бұрын
Great video Jack, as per usual! Could we get access to that performance test you mention in the video? Thanks!
@tanercoder1915
@tanercoder1915 Жыл бұрын
what playlist is this video belong to?
@balfouri4579
@balfouri4579 3 жыл бұрын
thank you so much for great video. i could understand so easily 👍
@andrewclarke8163
@andrewclarke8163 Жыл бұрын
Very helpful video! What are you using to change the way arrows and inequalities in your code are displayed?... I assume it's some VSCode plugin
@jherr
@jherr Жыл бұрын
Enable ligatures with the a font that supports ligatures.
@MrJoaopaulofurtado
@MrJoaopaulofurtado 3 жыл бұрын
Great video!
@Dysfunctional704
@Dysfunctional704 2 жыл бұрын
Hi! I'm trying to learn MobX. With it, why would need React's context hook when I can just import my MobX container freely throughout the app?
@jherr
@jherr 2 жыл бұрын
I don't think you need to use context if you are using MobX.
@Dysfunctional704
@Dysfunctional704 2 жыл бұрын
@@jherr Thanks Jack!
@zephyr242
@zephyr242 3 жыл бұрын
Hi Jack, great videos! Heads up, it looks like your Discord server invite link is invalid.
@jherr
@jherr 3 жыл бұрын
Yep. Looks like it times out? I need to write a script to update all the video descriptions. 😂
@AwadheshKumar-rk2mu
@AwadheshKumar-rk2mu Жыл бұрын
Hi Jack, Can you please make detail video on mobx.
@yogenp
@yogenp 3 жыл бұрын
Been using Mobx lately and loving it. Any clues on persisting data without the use of decorator?
@jherr
@jherr 3 жыл бұрын
No, but as I recall they always have decorator-less alternative. So if you can't find it in the docs I'm sure you can ask in a support channel.
@yogenp
@yogenp 3 жыл бұрын
@@jherr Thanks Jack. Awesome contents, btw. Cheers.
@Freedom_Code
@Freedom_Code 3 жыл бұрын
Why do you throw MobX class methods outward ?
@jherr
@jherr 3 жыл бұрын
I'm not sure what that means. Could you clarify that a little?
@Freedom_Code
@Freedom_Code 3 жыл бұрын
@@jherr when you realised TodoStore you code functions with enter values, why you didn't use class methods ?
@jherr
@jherr 3 жыл бұрын
@@Freedom_Code Can you point to a particular time in the video where I do this?
@Freedom_Code
@Freedom_Code 3 жыл бұрын
Why independent functions instead class Methods ?
@jherr
@jherr 3 жыл бұрын
@@Freedom_Code Oh, I see, no particular reason. Feel free to drop to those in the class. Honestly, this video is part of a series of videos I've done across a variety of state managers. So if you are familiar with that series I use those same functions across all of them, and so it would let folks know that the implementation of addTodo isn't changing between any of them. They all do addTodo and removeTodo the same way. But you are correct, the "correct" implementation here would be to put that logic into the class.
@daheck81
@daheck81 3 жыл бұрын
Hey Jack, thanks for all your videos! What is your personal favorite when it comes to state management in a rather large project? The amount of state management tools is crazy and makes it difficult to choose the right one for your needs since they are all pretty similar but still offer different nifty solutions. Would you say at the end of the day it is personal preference and what would you personally recommend? PS: My current go-to solution is using React's Context API with actions and reducers so it looks pretty similar to the Redux boilerplate code but doesn’t really bloat the project since it is a built-in solution. Works great on smaller projects but the amount of rerenderings would probably slow down the application as it grows so I'm looking for an alternative for bigger projects. And since most of the backends I currently build and interact with are Apollo/GraphQL/Lambda based, using Apollo Client as a state manager (with its cache) would also be a good solution for bigger projects no? Thanks in advance 🙌
@jherr
@jherr 3 жыл бұрын
I personally haven't tried using just Apollo for state management. I realize that there is an overlap there between Apollo and global state management, but I always found I needed some number of globals (e.g. user ID, auth state, etc.) I'd probably go with Zustand for large projects. It's very lightweight. It has solid Typescript support. And you can't just directly set values on the store, which is great for small projects but a little less awesome in larger team projects.
@daheck81
@daheck81 3 жыл бұрын
@@jherr Awesome, this was exactly what I was thinking about as well. Thank you for answering! Looking forward to your upcoming videos and happy coding :)
@adicide9070
@adicide9070 3 жыл бұрын
What is that funky theme you like so much?? :)
@jherr
@jherr 3 жыл бұрын
Apollo Midnight with some tweaks to make it Italic.
@adicide9070
@adicide9070 3 жыл бұрын
@@jherr Thanks, and just so you know--the vids on TS/React => very helpful as a distillation of the cheatsheets and more.
@jherr
@jherr 3 жыл бұрын
@@adicide9070 Thanks!
@asdfaam
@asdfaam 2 жыл бұрын
Are there any videos for testing react components with MobX -- you alluded in the video that it would be more difficult because you need to wrap the components, but unsure how to approach that. @JackHerrington
@Ruzakisan
@Ruzakisan 3 жыл бұрын
For things like newTodo should use local state like useState rather than store, even in mobX.
@oluwatobisholanke4117
@oluwatobisholanke4117 2 жыл бұрын
This is cool
@SoulProxy9001
@SoulProxy9001 3 жыл бұрын
I prefer using MobX store actions as it enforces cleaner flow.
@SoulProxy9001
@SoulProxy9001 3 жыл бұрын
And what I mean by that - if for example you have multiple consumers of the same store and variables actions allow for easier debugging to see where did the change for the store came from.
@jherr
@jherr 3 жыл бұрын
I should have added a section on actions, they are definitely a good way to ensure the integrity of the store.
@ram-bk4mu
@ram-bk4mu 3 жыл бұрын
Could you please make videos on design patterns with examples? :)
@jherr
@jherr 3 жыл бұрын
Yep, that's what I've been doing a lot of lately: kzbin.info/www/bejne/iYuVnHShgsl0kKc
@ram-bk4mu
@ram-bk4mu 3 жыл бұрын
@@jherr Oh great!!! thanks! also videos on Algorithms can be very helpful, I would pay for your courses Sir! I will at least get all my friends subbed to you channel! Cheers
@romanmed9035
@romanmed9035 2 жыл бұрын
20201 and class?
@travisarndt853
@travisarndt853 2 жыл бұрын
Agree Mobx is a terrible name of a observer library. I guess the "ob" is for observer but still
@denilsoncosta9837
@denilsoncosta9837 3 жыл бұрын
MobX seems pretty straightforward, but i think zustand simplify my life.
@nathantorquato9777
@nathantorquato9777 3 жыл бұрын
nah.. just too easy, don't like it ahhahahaha question though: what about rendering performance? does it cause unnecessary re-rendering?
@DavidSmith-ef4eh
@DavidSmith-ef4eh 3 жыл бұрын
nope... only re-renders if the mobx properties used in the components change.
@B3NALLAL
@B3NALLAL 3 жыл бұрын
💙🙏
@m00nreal
@m00nreal 3 жыл бұрын
I liked better Zustand =)
Typescript for React Components From Beginners to Masters
27:51
Jack Herrington
Рет қаралды 162 М.
MobX Tutorial with React and Typescript
35:53
CodeDunks
Рет қаралды 19 М.
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
Picking From 20 React State Managers
35:18
Jack Herrington
Рет қаралды 86 М.
Mastering React Hooks with Typescript
55:12
Jack Herrington
Рет қаралды 101 М.
Mobx React - State Management Alternative to Redux
14:26
Monsterlessons Academy
Рет қаралды 10 М.
Назим Гафаров - Воркшоп: Знакомство с MobX
1:11:47
HolyJS — конференция для JavaScript‑разработчиков
Рет қаралды 12 М.
Dependency Injection | Prime Reacts
28:34
ThePrimeTime
Рет қаралды 363 М.
Mastering React Context: Do you NEED a state manager?
37:26
Jack Herrington
Рет қаралды 100 М.
Why I Moved from React Redux to Zustand and Why You Should Too!
19:24
Introduction to React #14 | MobX
11:51
Jack Herrington
Рет қаралды 10 М.
“use cache” NextJS’s latest take on data caching
17:27
Jack Herrington
Рет қаралды 11 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 192 М.