JS-Higher order functions Part 1- map( ) | connect( )

Part-1 talks about higher order functions in Javascript and mental models of frequently used Higher order functions like map( ) of Array and connect( ) of Redux.
6:33 - connect( ) of redux
Remember that actual implementation of connect( ) would be a bit complex but this one gives a construct to think in that direction.
In Part-2, I will talk about how memory allocation, scope and closures work in higher order functions.
Gist link for connect( ) mental model : gist.github.com/singh-sourav/...
Connect with me here :
LinkedIn : / sourav-singh-6b57b5101
From,
Sourav Singh
SDE at Disney+ Hotsar | Ex-Swiggy
Former Mentor at Alien Brains Educations

Пікірлер: 2

  • @sourav_singh_diaries
    @sourav_singh_diaries3 жыл бұрын

    Small edit : I missed "return" in render. and For proper diff of states, oldState should be captured inside render() method. So that each time, component renders we should have the current oldState . this.oldState= mapStateToProps().. Go to gist link in description for corrected model