Version: v4.11.0
use-counter
#
AboutCounter hook for React.
#
Installation#
Importing the hook#
Usage#
ArgumentsArgument | Type | Description |
---|---|---|
initialValue | number | Initial value of the counter |
#
ReturnReturn value | Type | Description |
---|---|---|
counter | Object | Object containing {value,increment,decrement,incrementBy,decrementBy,reset} |
#
Codesandbox Examples#
Basic Usage#
Join Bhargav's discord serverYou can click on the floating discord icon at the bottom right of the screen and talk to us in our server.