Skip to content

Component cannot be used as a JSX component #432

Open
@DerekChan65535

Description

@DerekChan65535

I have got an error on create-react-app project with the latest core UI.

How to reproduce:

  1. Create default react ts sandbox.
  2. Add "@coreui/coreui": "^5.3.2", "@coreui/react": "^5.5.0", to package.json.
  3. Use CButton in the App.tsx

Got compile error:

'CButton' cannot be used as a JSX component.
  Its return type 'ReactNode' is not a valid JSX element.
    Type 'undefined' is not assignable to type 'Element | null'.typescript(2786)

https://codesandbox.io/p/sandbox/jr4t78?file=%2Fsrc%2FApp.tsx%3A9%2C8

Image

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy