'I get null as result in useSelector from react redux toolkit

In Component useSelector return null. Why? I read data from cloud firestore.

const products = useSelector((state) => state.products.products);
console.log(products) - this is null, why?

productSlice.js

enter image description here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source