Skip to content

What is useReducer hook in React? #9

Discussion options

You must be logged in to vote

Hii Pranth, useReducer is basically an alternative to useState, It accepts a reducer of type (state, action) => newState, and returns the current state paired with a dispatch method. (If you’re familiar with Redux, you already know how this works.)

You can refer to these url's to know more,

Thanks

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PranthRaval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants