Top "React-hooks" questions

Hooks is a new feature that allows developers to use state(s) and other React features without writing a class.

How to send params in useHistory of React Router Dom?

I am using React Router hooks for navigation useHistory. Navigate : history.push("/home", { update: true }); In home : I am trying …

reactjs react-hooks react-router-dom
React Hook Form with AntD Styling

I'm trying to figure out how to use react-hook-form with antd front end. I have made this form and it …

reactjs react-hooks antd react-hook-form
React hooks: accessing up-to-date state from within a callback

EDIT (22 June 2020): as this question has some renewed interest, I realise there may be a few points of confusion. So …

javascript reactjs react-hooks
React: Setting State for Deeply Nested Objects w/ Hooks

I'm working with a deeply nested state object in React. My code base dictates that we try to stick with …

javascript reactjs state react-hooks setstate
React Hooks and Component Lifecycle Equivalent

What are the equivalents of the componentDidMount, componentDidUpdate, and componentWillUnmount lifecycle hooks using React hooks like useEffect?

javascript reactjs react-hooks
Why use `useTable` over `ReactTable` when using react-table

On their npm page, the example shows the usage of <ReactTable> component: import ReactTable from 'react-table' ... render() { return ( &…

javascript reactjs datagrid react-hooks react-table
UseState shows previous value always

This is a popular question among all the new react developers but somehow I'm not able to understand the logic …

javascript reactjs react-native react-hooks use-state
React useReducer Hook fires twice / how to pass props to reducer?

FOREWORD / DESCRIPTION I am trying to use React's new hooks feature for an e-commerce website that I am building, and …

javascript reactjs react-hooks react-context
How to fix "React Hook useEffect has a missing dependency. Either include it or remove the dependency array" problem?

I want to use useEffect, but when I add getUpperGroup method, I get warning: React Hook useEffect has a missing …

reactjs typescript react-redux react-hooks react-typescript