Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Demo 1 - React - CodeBlock.tsx


Hi team,

I'm getting these two errors when I do a build -

----------------------------------------------------------------------

No overload matches this call.
Overload 1 of 2, '(props: Props | Readonly<Props>): CopyToClipboard', gave the following error.
Type '{ children: Element; text: string; onCopy: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<CopyToClipboard> & Readonly<Props>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<CopyToClipboard> & Readonly<Props>'.
Overload 2 of 2, '(props: Props, context: any): CopyToClipboard', gave the following error.
Type '{ children: Element; text: string; onCopy: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<CopyToClipboard> & Readonly<Props>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<CopyToClipboard> & Readonly<Props>'.

----------------------------------------------------------------------

'Highlight' cannot be used as a JSX component.
Its instance type 'Highlight' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("D:/Development/Integrations/VSCode/vod/vod-poc-frontend-server/node_modules/react-intl/node_modules/@types/react/index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.

----------------------------------------------------------------------

- Running the latest gist files
- Node v16.15.0

Cheers!


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

Could you please check the doc: https://preview.keenthemes.com/metronic8/react/docs/docs/quick-start. It should help you to avoid this issue.

Regards,
Keenthemes support


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(