/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
examples/with-rematch/shared/utils.js
10 строк
285 B
Steven
chore(examples): use default prettier for examples/templates (#60530)
12 янв 2024, 02:01
Не верифицирован
12 янв 2024, 02:01
4466ba4
Код
Авторство
О чём код?
// 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); };