Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I’m trying out the new React Hooks and have a Clock component with a counter which is supposed to increase every second. However, the value does not increase beyond one. function Clock() { const [time, setTime] = React.useState(0); React.useEffect(() => ...

  • 0

In the official docs of React it mentions – If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillUnmount combined. My question is – how can we use the componentWillMount() lifecyle method in a hook?

  • 0

I have a component that uses useContext and then its output is dependent on the value in the context. A simple example: import React, { useContext } from 'react';const MyComponent = () => { const name = useContext(NameContext);return <div>{name}</div>; }; When testing ...