Undefined when trying to pass state to component

Viewed 27

Thats my store:

export const store: Store<any, Action> & {
  dispatch: DispatchType
}= createStore(
  reducers,
  {},
  composeWithDevTools(applyMiddleware(...middleware))
)

i'm trying to pass some values to a component, using:

export const getAllMovies = (state: MovieResult) => state;

and in the component:

const movies = useSelector(getAllMovies);

but when i try to access the values inside that got undefined (sounds funny, because i could console.log the state, but not the values), whats wrong here?

0 Answers
Related