import { useEffect } from "react";
import { isServer } from "../../../utils/is-server";
function useUniversalDispatch(dispatch, action, args) {
  if (isServer()) {
    dispatch(action(...args));
  }
  useEffect(() => {
    dispatch(action(...args));
  }, [dispatch, action, ...args]);
}
export {
  useUniversalDispatch
};
//# sourceMappingURL=use-universal-dispatch.js.map