react-code-blocks
react-code-blocks copied to clipboard
CopyBlock: Errors in the Console because of copied/codeBlock
I'm seeing two warnings and errors in the console in the UI when using CopyBlock. They say:
React does not recognize the
codeBlockprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasecodeblockinstead. If you accidentally passed it from a parent component, remove it from the DOM element.
and
Warning: Received
falsefor a non-boolean attributecopied. 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
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.
any update on this? In nextJS, it breaks making the site unusable.