From the course: React: State Management (2019)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Avoid prematurely adding state management packages - React.js Tutorial
From the course: React: State Management (2019)
Avoid prematurely adding state management packages
- [Instructor] Let's talk about why we need state management. As soon as you extend beyond basic functionality, there's typically some need for a state management solution. As you begin to manage large amounts of data, it can become pretty unwieldy. The main reason to use a state management solution is that it manages business logic. Well, what do I mean by that? Let's start with the distinction between presentation and business logic. Presentation logic refers to logic that's associated with how components appear on a page. For example, when should a modal dialog pop up? Does the color of a button change when a user hovers over it? Another way to think about it is, think of logic that's agnostic towards the application's purpose. On the other hand, we have business logic, which refers to handling, manipulating, and storing business objects. So for example, in a to-do app where we have a user that needs to log in, it could mean things like user accounts or items in a to-do list…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Avoid prematurely adding state management packages3m 2s
-
(Locked)
The power of setState()3m 21s
-
(Locked)
Data fetching only using React4m 16s
-
(Locked)
Avoiding the pitfall of prop drilling4m 2s
-
(Locked)
Defining Context2m 2s
-
(Locked)
Using the Context API4m 30s
-
(Locked)
Implementing Hooks3m 23s
-
(Locked)
React Hooks: Refactoring2m 32s
-
(Locked)
-
-
-
-