simplest-redux-example icon indicating copy to clipboard operation
simplest-redux-example copied to clipboard

pass data from when i click on button

Open harishmahajan opened this issue 7 years ago • 1 comments

i want to increment by 5 or 6, but the condition is that i have to pass this data when i click on button.

something like <button onClick={onIncreaseClick(5)}>Increase

then the counter will be 0,5,10,15,......

something like <button onClick={onIncreaseClick(3)}>Increase

then the counter will be 0,3,6,9,12......

in short i will pass the value from button click.

harishmahajan avatar Feb 12 '18 14:02 harishmahajan

You can pass the value as an argument or set that incremented value with redux structure whenever you change that incremented value its relevant changes made automatically.

ankitkanojia avatar Sep 12 '19 07:09 ankitkanojia