1
00:00:02,540 --> 00:00:04,600
The first tradeoff is framework versus

2
00:00:04,600 --> 00:00:07,720
library. Competitors like Angular and

3
00:00:07,720 --> 00:00:10,910
Ember are frameworks. React, in contrast,

4
00:00:10,910 --> 00:00:12,990
is generally considered a library since

5
00:00:12,990 --> 00:00:16,080
it's lean and focused on components. Now a

6
00:00:16,080 --> 00:00:18,020
framework isn't fundamentally better than

7
00:00:18,020 --> 00:00:21,060
a library. It's a tradeoff. Here's a few

8
00:00:21,060 --> 00:00:22,800
advantages to choosing the framework

9
00:00:22,800 --> 00:00:24,750
approach. A framework contains more

10
00:00:24,750 --> 00:00:27,380
opinions, so you can avoid spending time

11
00:00:27,380 --> 00:00:29,980
trying to choose between many options.

12
00:00:29,980 --> 00:00:33,020
This reduces decision fatigue, and there's

13
00:00:33,020 --> 00:00:36,400
often less setup overhead. Frameworks can

14
00:00:36,400 --> 00:00:38,520
help enforce consistency since most

15
00:00:38,520 --> 00:00:41,240
frameworks are more opinionated. However,

16
00:00:41,240 --> 00:00:43,490
React's Library approach also has some

17
00:00:43,490 --> 00:00:47,190
clear advantages. At only around 35K

18
00:00:47,190 --> 00:00:49,570
Gzipped, React is significantly smaller

19
00:00:49,570 --> 00:00:52,120
than most frameworks. This means that it's

20
00:00:52,120 --> 00:00:53,910
small enough that you can sprinkle it on

21
00:00:53,910 --> 00:00:55,950
existing applications so that you can

22
00:00:55,950 --> 00:00:58,970
slowly migrate an existing app to React,

23
00:00:58,970 --> 00:01:02,940
even a server‑side rendered app. Imagine

24
00:01:02,940 --> 00:01:04,980
you have an existing app built in .NET,

25
00:01:04,980 --> 00:01:08,850
Java, Ruby, PHP, Python, whatever. Since

26
00:01:08,850 --> 00:01:10,740
React is small and flexible, you can

27
00:01:10,740 --> 00:01:12,780
replace a single component on the page

28
00:01:12,780 --> 00:01:15,280
with a React component. So you can use

29
00:01:15,280 --> 00:01:17,410
your React components anywhere because

30
00:01:17,410 --> 00:01:19,510
they're lightweight. This is precisely how

31
00:01:19,510 --> 00:01:21,520
Facebook slowly migrated from a

32
00:01:21,520 --> 00:01:24,630
server‑side rendered PHP application to

33
00:01:24,630 --> 00:01:28,800
React. And React doesn't force many

34
00:01:28,800 --> 00:01:31,020
decisions on you. It allows you to only

35
00:01:31,020 --> 00:01:33,110
pull in the features that you need to keep

36
00:01:33,110 --> 00:01:35,560
your app lean and fast. You're free to

37
00:01:35,560 --> 00:01:37,740
pick the precise technologies that you

38
00:01:37,740 --> 00:01:40,580
need for your project, and you're free to

39
00:01:40,580 --> 00:01:42,810
select the best technology for your use

40
00:01:42,810 --> 00:01:46,560
case as well. Decision fatigue is also

41
00:01:46,560 --> 00:01:48,660
largely a solved problem with React

42
00:01:48,660 --> 00:01:50,470
because opinionated boiler plates, like

43
00:01:50,470 --> 00:01:53,030
create‑react‑app, effectively turn React

44
00:01:53,030 --> 00:01:56,920
into an optional framework. Now since

45
00:01:56,920 --> 00:01:59,420
React is a focused component library, more

46
00:01:59,420 --> 00:02:01,700
comprehensive frameworks like Angular come

47
00:02:01,700 --> 00:02:03,510
bundled with more features, including

48
00:02:03,510 --> 00:02:06,430
testing, a library for HTTP calls,

49
00:02:06,430 --> 00:02:09,280
routing, and internationalization all

50
00:02:09,280 --> 00:02:12,540
built in. In contrast with React, you

51
00:02:12,540 --> 00:02:14,530
select the pieces that apply to your use

52
00:02:14,530 --> 00:02:17,290
case and you add them in. Since React is

53
00:02:17,290 --> 00:02:19,160
very popular, there's almost certainly a

54
00:02:19,160 --> 00:02:21,440
mature library that does what you need.

55
00:02:21,440 --> 00:02:23,200
Here's just a few of the most popular

56
00:02:23,200 --> 00:02:25,800
options for each use case. And the nice

57
00:02:25,800 --> 00:02:27,950
thing with React is your users don't have

58
00:02:27,950 --> 00:02:29,840
to waste time downloading and parsing

59
00:02:29,840 --> 00:02:37,000
features that they don't use. You can pull in only what you need from this list.

