React Redux props is always udefined
The following code is a small implementation of your scenario. The code uses connect HOC to fetch data from redux.
Note: The commented code is the one that uses useSelector. Feel free to use the either of the two Please refer to the code: https://stackblitz.com/edit/react-8ivxam