Intent - Encapsulate a request as an object thereby letting you parameterize with different requests , queue or log requests and support undoable options Now we will create two classes exit command will exit out of nodejs and create command will create new file. Now the interesting part of this post comes where we will define a class with help of which we will be able to run above defined commands , undo previously run command or redo previously undo command. At last with help of readline module we will take input from user of command which is to be executed.. Hope you like the post.Keep learning...
In this post we will make custom middleware which will log action dispatched and updated state to console. Below is code for custom middleware named logger Now we will add this custom middleware to redux store. Hope you like the post.Keep learning..