DEV Community

Ryan Storm
Ryan Storm

Posted on

useSelector hook in Reactjs not working causing a $RefreshSig$ is not a function error

0

I am having trouble finding the cause of this error. I have seen it before but I am unable to fix this one. The browser shows a $RefreshSig$ is not a function. I don't believe it has anything to do with react and react-refresh versions because I already checked that and saw this before and fixed it by moving the useSelector outside of a function. This case is different as I would not know where to move the useSelector. The commented code: //const selectedValue... is the old code and I am trying to replace it with the useSelector hook. Here is the code screenshots:

index.js:

Image description

GicSelectorFilter.jsx:

Image description

Browser error:

Image description

Any help is appreciated!

Top comments (0)