Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3114 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3112 stevensc 1
import { useContext, useEffect } from 'react'
2
import { HabitsContext } from '@app/providers/habits'
3
import { useFetch } from '../useFetch'
4
 
5
export function useHabits({ url }) {
6
  const { data: values, isLoading: loading } = useFetch(url)
7
  const habitsState = useContext(HabitsContext)
8
 
9
  useEffect(() => {
10
    console.log(values)
11
  }, [values])
12
 
13
  return { ...habitsState, loading }
14
}