Skip to content

Console Error: Received false for a non-boolean attribute copied. #892

Open
@najihmld

Description

@najihmld

// package.json

  "dependencies": {
    "next": "15.3.1",
    "react": "^19.0.0",
    "react-code-blocks": "^0.1.6",
    "react-dom": "^19.0.0",
    "react-element-to-jsx-string": "^17.0.1",
  }

// page.tsx

import { atomOneLight, atomOneDark, CopyBlock } from 'react-code-blocks';
import { useTheme } from 'next-themes';

......

  <CopyBlock
          text={jsxString}
          language="jsx"
          showLineNumbers
          wrapLongLines
          theme={theme === 'dark' ? atomOneDark : atomOneLight}
  />

Console Error

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()}.

If you used to conditionally omit it with copied={condition && value}, pass copied={condition ? value : undefined} instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions