GSto / peanutbutterjavascript

source code of peanutbutterjavascript.com
0 stars 0 forks source link

Incorrect argument ordering in example code #1

Open tnrich opened 3 years ago

tnrich commented 3 years ago

Just a heads up that the following is incorrect (on the page https://www.peanutbutterjavascript.com/posts/mastering-mergeprops-in-redux): image

what is canonically called "ownProps" should come after the other two arguments:

https://react-redux.js.org/api/connect#mergeprops-stateprops-dispatchprops-ownprops--object

image

You should update your example to not confuse people :)

Thanks!

niron1 commented 1 year ago

I wish I have seen that before wasting 2 hours relying on erroneous example :) :)