Category "react-hooks"

TypeError: (0 , _react.useEffect) is not a function

when in the development environment, my app works just fine. When in the production environment it crashes with the error: Uncaught TypeError: (0 , _react.useE

useLazyQuery not being called after onClick

I'm trying to check if my user isLoggedIn with a query from GraphQL API data from the user if it's loggedin if not it's supposed to return undefined or some err

useLocation: Hooks can only be called inside of the body of a function component

I'm trying to use the useLocation hook in my function component but I'm getting Error: Invalid hook call. Hooks can only be called inside of the body of a funct

React.useState is changing initialValues const

I'm experiencing some odd behavior with react's useState hook. I would like to know why this is happening. I can see a few ways to sidestep this behavior, but w

How to create a custom hook that recives dependencies?

I'm making a custom hook that have a toogle when some state change. You should be able to pass any state in an array. import { useState, useEffect } from 'rea

Implementing a countdown timer in React with Hooks

Im trying to render a count down timer on screen with react hooks, but I'm not sure the best way to render it. I know i'm supposed to use the useEffect to comp