/
Garuda
/
flash-front
Обзор
Документация
Войти
/
Garuda
/
flash-front
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/dev/useInitial.js
15 строк
520 B
Torward
dropdown menu
11 фев 2024, 08:34
11 фев 2024, 08:34
c500a62
Код
Авторство
О чём код?
import {useState} from 'react'; export const useInitial = () => { const [status, setStatus] = useState({ loading: false, error: false, }); /* Implement hook functionality here. If you need to execute async operation, set loading to true and when it's over, set loading to false. If you caught some errors, set error status to true. Initial hook is considered to be successfully completed if it will return {loading: false, error: false}. */ return status; };