Reakit: Interacting with a toolbar item triggers updates for all the other items

Created on 19 Nov 2019  路  3Comments  路  Source: reakit/reakit

馃悰 Bug report

Current behavior

Interacting with a toolbar item or menu item (also inside toolbar) triggers updates for all the other items.

Steps to reproduce the bug

  1. Open sandbox: https://codesandbox.io/s/reakit-menu-with-tooltip-4wbml?from-embed
  2. Remove any line
  3. See console logs

Expected behavior

I'll expect to just update the button that the user is interacting.
Since the api requires to pass useToolbarState and useMenuState to all items I guess this is expected if is tracking the last focused element, current focused element, values etc...

So I'm not sure if this is a real issue or the intended / expected behavior :confused:

Environment

Please, run the command below inside your project directory.

$ npx envinfo --system --binaries --browsers --npmPackages "{react*,reakit*}"

Environment:
  OS:  Linux 4.15
  Node:  10.15.3
  Yarn:  1.19.1
  npm:  6.12.0
  Watchman:  Not Found
  Xcode:  N/A
  Android Studio:  Not Found
discussion stale

Most helpful comment

Thanks for opening the issue! That's the intended behavior, but maybe we can trigger updates only on the relevant components (the one that is losing focus and the one that is receiving focus).

But I'm not sure if the added check would be faster than just rendering the component. We need some automated performance test. Related to #429

All 3 comments

Hey @btzr-io :wave:,

Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.

If you use Reakit at work, you can also ask your company to sponsor us :heart:.

Thanks for opening the issue! That's the intended behavior, but maybe we can trigger updates only on the relevant components (the one that is losing focus and the one that is receiving focus).

But I'm not sure if the added check would be faster than just rendering the component. We need some automated performance test. Related to #429

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

folz picture folz  路  4Comments

codyaverett picture codyaverett  路  4Comments

Regaddi picture Regaddi  路  4Comments

diegohaz picture diegohaz  路  4Comments

btzr-io picture btzr-io  路  3Comments