tippyjs-react icon indicating copy to clipboard operation
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

Open curiolearner opened this issue 4 years ago • 0 comments

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

curiolearner avatar Mar 25 '21 13:03 curiolearner