Reakit: Potential React warning triggered by useToolbarState

Created on 19 May 2020  路  6Comments  路  Source: reakit/reakit

On Gutenberg when doing:

  • Type * on an empty paragraph

    • Click "cmd + z" to undo

It triggers a React warning with the following stack trace

Capture d鈥櫭ヽran 2020-05-19 脿 3 02 45 PM

And if I'm reading right, this is the only place where this could be triggered right?

https://github.com/WordPress/gutenberg/blob/692ec8cb40f8372484da4ddb8930fe4fecf6e8a7/packages/components/src/toolbar/toolbar-container.js#L20

Reproduction
https://codesandbox.io/s/wordpress-slotfill-reakit-toolbar-nw01x

help wanted potential bug

All 6 comments

Hey @youknowriad :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:.

Hi @youknowriad, thanks for this! Do you think you could create a minimal CodeSandbox demonstraighting this error?

Looks like it only happens in the context of Gutenberg, and I suspect it's somehow related to https://github.com/WordPress/gutenberg/issues/17355#issuecomment-629934483

I'll try to put together a minimal reproduction and see if there's something we can do on Reakit to prevent it.

@diegohaz That's great, thanks for your help. I admit I don't know enough knowledge in this area of our codebase to be able to create a minimal reproduction CodeSanbox.

Here's a reproduction of the problem: https://codesandbox.io/s/wordpress-slotfill-reakit-toolbar-nw01x

Working on a fix.

Thanks for the fix @diegohaz

Was this page helpful?
0 / 5 - 0 ratings