Skip to content

Button can't be rendered as it's return type is ReactNode. #962

@DavideFrancescon

Description

@DavideFrancescon
  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

  1. Create a CRA,
  2. Install flowbite react
  3. Add a button to a page

Current behavior

TS2786: 'Button' 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'.

Expected behavior

To normally render a Button

Workaround

CTRL/CMD+click on Button component will bring you to the .d file, there change the last NodeElement into JSX.Element. After this restart the server

I might fix this bug myself when i have 10 free minutes if noone picks this up before me

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