simplest-redux-example
simplest-redux-example copied to clipboard
pass data from when i click on button
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.
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.