4.1.0
Added useSelector hook + tests
Added optional callbacks to setState inside hooks
// if you only want to subscribe to part of your state (this example the first product)
const cartProducts = cartProductsState.useSelector((state) => state[0]);
// custom comparison function (only use this if you have heavy child components and the default === comparison is not efficient enough)
const cartProducts = cartProductsState.useSelector(
(state) => state[0],
(a, b) => JSON.stringify(a) === JSON.stringify(b)
);