next.js/examples/with-rematch/shared/utils.js
utils.js11 lines285 B
// Robust way to check if it's Node or browser
import { useDispatch } from "react-redux";
export const checkServer = () => {
  return typeof window === "undefined";
};

export const useRematchDispatch = (selector) => {
  const dispatch = useDispatch();
  return selector(dispatch);
};
Quest for Codev2.0.0
/
SIGN IN