Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,150 --> 00:00:05,600
Now that is it for this course section.
2
00:00:05,600 --> 00:00:07,450
Was again another long section
3
00:00:07,450 --> 00:00:11,760
but it was about a super important topic, Redux.
4
00:00:11,760 --> 00:00:16,010
And you did learn initially how you can set up Redux
5
00:00:16,010 --> 00:00:19,040
without React and then how you can set it up
6
00:00:19,040 --> 00:00:20,770
without Redux Toolkit.
7
00:00:20,770 --> 00:00:24,820
Now Redux Toolkit is amazing and my strong recommendation
8
00:00:24,820 --> 00:00:27,610
is to use it because as you saw
9
00:00:27,610 --> 00:00:29,550
throughout this course section,
10
00:00:29,550 --> 00:00:33,070
it's much easier to manage your state and your reducers
11
00:00:33,070 --> 00:00:35,370
and your actions when using Toolkit
12
00:00:35,370 --> 00:00:38,747
instead of having to set up everything on your own.
13
00:00:38,747 --> 00:00:42,610
Still it's important to know what happens behind the scenes
14
00:00:42,610 --> 00:00:45,880
which is why I did start without Redux Toolkit
15
00:00:45,880 --> 00:00:48,800
so that you really know everything about Redux
16
00:00:48,800 --> 00:00:51,930
what you need to know and so that you're also able
17
00:00:51,930 --> 00:00:56,130
to dive into projects that might not be using Redux Toolkit
18
00:00:56,130 --> 00:00:58,220
but just Redux.
19
00:00:58,220 --> 00:01:01,420
Now then you learn about these core Redux concepts
20
00:01:01,420 --> 00:01:03,900
and this Redux flow you learned
21
00:01:03,900 --> 00:01:08,720
about actions and reducers or this one root reducer
22
00:01:08,720 --> 00:01:11,757
and about the fact that Redux has this one
23
00:01:11,757 --> 00:01:16,090
central data store that we can create this store
24
00:01:16,090 --> 00:01:19,780
with configure store when using Redux Toolkit.
25
00:01:19,780 --> 00:01:21,570
And that then as an argument,
26
00:01:21,570 --> 00:01:25,850
we pass in an object where we assign our route reducer.
27
00:01:25,850 --> 00:01:29,500
We either point at just one reducer function,
28
00:01:29,500 --> 00:01:32,138
or we set up such a map of reducers,
29
00:01:32,138 --> 00:01:34,680
which are then merged together
30
00:01:34,680 --> 00:01:38,200
into one big reducer behind the scenes.
31
00:01:38,200 --> 00:01:40,605
Now we also learned how we can then use
32
00:01:40,605 --> 00:01:44,100
our Redux managed data
33
00:01:44,100 --> 00:01:46,130
that we can use useSelector
34
00:01:46,130 --> 00:01:51,020
in our components to read data from our Redux managed state
35
00:01:51,020 --> 00:01:54,060
and that we can use useDispatch to get access
36
00:01:54,060 --> 00:01:56,060
to that dispatch function
37
00:01:56,060 --> 00:01:59,150
which we use to dispatch our actions,
38
00:01:59,150 --> 00:02:02,330
which then ultimately leads to our Redux state
39
00:02:02,330 --> 00:02:03,530
being changed.
40
00:02:03,530 --> 00:02:06,870
We also learned that we can pass extra data
41
00:02:06,870 --> 00:02:10,300
to those actions because you often have actions
42
00:02:10,300 --> 00:02:15,300
and reducer function there for which do need extra data.
43
00:02:15,700 --> 00:02:18,640
We also learned how we would connect a
44
00:02:18,640 --> 00:02:21,200
class-based component to Redux.
45
00:02:21,200 --> 00:02:23,290
We're not going to use that in this course
46
00:02:23,290 --> 00:02:26,090
and you might not see it too often out there
47
00:02:26,090 --> 00:02:27,810
but on the other hand, there are a lot
48
00:02:27,810 --> 00:02:31,170
of projects which still only use class based components.
49
00:02:31,170 --> 00:02:33,500
So that's definitely also something you
50
00:02:33,500 --> 00:02:34,593
should be aware of.
51
00:02:35,610 --> 00:02:38,900
And there for now we have a very solid foundation
52
00:02:38,900 --> 00:02:41,120
when it comes to Redux.
53
00:02:41,120 --> 00:02:43,260
Redux is an amazing library.
54
00:02:43,260 --> 00:02:46,550
It can replace React context as you learned
55
00:02:46,550 --> 00:02:49,820
but it's also not a must use library.
56
00:02:49,820 --> 00:02:54,350
It's always up to you to decide whether for your project
57
00:02:54,350 --> 00:02:56,580
you want to go with React context,
58
00:02:56,580 --> 00:02:58,600
or if you need Redux.
59
00:02:58,600 --> 00:03:01,760
React context can have certain disadvantages
60
00:03:01,760 --> 00:03:06,393
as I mentioned, but they might not matter in your project.
61
00:03:06,393 --> 00:03:11,030
You might not see or measure any performance issues
62
00:03:11,030 --> 00:03:15,110
and you might not have a super complex setup and management.
63
00:03:15,110 --> 00:03:17,970
Then of course, there's nothing wrong with sticking
64
00:03:17,970 --> 00:03:21,900
to React context, because you must not forget that
65
00:03:21,900 --> 00:03:26,590
if you use Redux, you do add an extra third party library.
66
00:03:26,590 --> 00:03:28,010
And that of course adds
67
00:03:28,010 --> 00:03:31,020
up to the overall code of your application.
68
00:03:31,020 --> 00:03:34,010
It makes your application bigger.
69
00:03:34,010 --> 00:03:36,230
So Redux is not always better.
70
00:03:36,230 --> 00:03:38,071
It can be a decent option and now
71
00:03:38,071 --> 00:03:43,030
you know how it works and when you should maybe consider it.
72
00:03:43,030 --> 00:03:46,200
Now we are going to work more with it throughout the course
73
00:03:46,200 --> 00:03:48,690
but this is now a solid foundation
74
00:03:48,690 --> 00:03:51,253
which you need as a React developer.
5930
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.