Can someone help me to go through this definition step by step?
select<T, Props, K>(pathOrMapFn: string | ((state: T, props?: Props) => any), propsOrPath: string | Props, ...paths: string[])
I don't get the hang of it...
It's the definition of the a selector
.
T
: the incoming stateProps
: if you're calling a selector with propsK
: the result of the selector
pathOrMapFn
can either be the path to the state or a createSelector
propsOrPath
can either be the path to the state or the props
...paths: string[]
the rest of the pathWith path to state I mean: select('featureState', 'persons', 'entities')