tippyjs-react
tippyjs-react copied to clipboard
why can't 2 dispatch be called or 2 set states be used with onClick event with Tippy enclosing the button
I tried various combinations of dispatch with reducer, set states with useState Or one type of each from the button's onClick event enclosed within Tippy. The result: Only one with be called. It does not matter if useCallback, called from function or in-line, it just did not work. However, if I called a function which dispatches both subsequentially, it worked.
Can someone help to explain why this is occurring? Is it the problem with Tippy or just onClick?
NB: Was using similar to FullyControlledClick