From the course: JavaScript: Patterns
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
State pattern - JavaScript Tutorial
From the course: JavaScript: Patterns
State pattern
- [Instructor] The state pattern has become very popular with React's usage, and now most web development frameworks use it, basically the state pattern is one where we hold the state of the application with all the data and properties needed and when it changes it updates a rendering of the application, and again needless to say, React and Angular, and every state management library are great examples of its use, let's take a look at the React application we have in our exercise files. So if you look into the exercise files, under chapter four and then video04_03, you have a React application with several components and state management in here, so let's open that in Visual Studio Code, so I'm going to drag and drop that folder inside of Visual Studio Code, and let's take a look at the application. So basically if we look at the app.js file here, you have a state right here, in your constructor, we are setting our…
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)
What are behavioral patterns?1m 4s
-
(Locked)
Observer pattern2m 36s
-
(Locked)
State pattern3m 6s
-
(Locked)
Chain of responsibility1m 30s
-
(Locked)
Iterator pattern3m 44s
-
(Locked)
Strategy pattern1m 36s
-
(Locked)
Memento pattern53s
-
(Locked)
Mediator pattern1m 32s
-
(Locked)
Command pattern2m 24s
-
(Locked)
-