Please be kind, if this question is very naive.
When working with redux the function createStore confused me a little. The function has three arguments:
createStore(reducer, preloadedState, enhancer)
Yet calling createStore like this also works with no problems:
createStore(reducer, enhancer)
This leads me to believe that the sequence of arguments does not really matter here. Does redux only check for the type of the arguments and then assign it to the right property. I looked in the source code, but since it is TypeScript I have a bit of a hard time understanding this.
How does this work?