Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CopyBlock: Errors in the Console because of copied/codeBlock #138

Open
Fae-Bell opened this issue Nov 17, 2023 · 2 comments
Open

CopyBlock: Errors in the Console because of copied/codeBlock #138

Fae-Bell opened this issue Nov 17, 2023 · 2 comments

Comments

@Fae-Bell
Copy link

I'm seeing two warnings and errors in the console in the UI when using CopyBlock. They say:

React does not recognize the codeBlock prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase codeblock instead. If you accidentally passed it from a parent component, remove it from the DOM element.

and

Warning: Received false for a non-boolean attribute copied.
If you want to write it to the DOM, pass a string instead: copied="false" or copied={value.toString()}.

Looking at the demo sandbox, this looks to have been introduced in 0.1.3: https://codesandbox.io/s/react-code-blocks-forked-lqwfkr

@peacechen
Copy link

This library does a terrific job rendering code. Thanks to @rajinwonderland for releasing this.

It would be fantastic if these warnings are addressed. There's a risk that it will break functionality in the future. Plus the noise in console makes it harder to see other issues.

@amosmachora
Copy link

any update on this? In nextJS, it breaks making the site unusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants