State Use Case : Design Patterns in TypeScript
Channel:
Subscribers:
24,900
Published on ● Video Link: https://www.youtube.com/watch?v=GVRb0glStzk
https://www.amazon.com/dp/B0948BCH24 : ASIN B0948BCH24
https://www.amazon.com/dp/B094716FD6 : ASIN B094716FD6
Documentation : https://sbcode.net/typescript/state/#state-use-case
This example takes the concept example further and instead assigns then next state in sequence rather than choosing the states subclasses randomly.
It also allows to set the state outside of the context by using a getter/setter.
The client will set the state, and then run a request, and then change the state again, etc, and depending on the state, the behaviour of the method would have changed.
#statePattern
#typescriptState
#statePatternTypescript
Other Videos By SBCODE
Tags:
Design Patterns In TypeScript
TypeScript
Design Patterns
state
state pattern