Search code examples
javascriptreactjsargumentsreact-propsreselect

how to passing arg in createStructuredSelector reselect


I am using createStructuredSelector from reselect like:

enter image description here

I am having a problem passing arguments to selectors. I am able to do event:

totalScore()

, which could return something. However, I am unable to get the version with arguments, conceptually event:

studentId => total : totalScore(studentId) 

working.

Can you guide me?


Solution

  • I found the answer, the following method can be used to send our argument to createStructuredSelector.

    enter image description here