how extend a button component

UI Components for React
Post Reply
luca.stancapiano
Posts: 27
Joined: 18 Jun 2018, 14:52

13 Jun 2021, 19:40

Hello everybody. I am using primereact 6.3.2 and I would like to extend the primereact / button component. Once with version 3 it was easy, it was enough to do something like this inside the component:

Code: Select all

import {Button} from 'primereact / button'
export class Party extends Button {
....
}
If I try now I get the error:
TypeError: Super expression must either be null or a function, not object

Since I have very large classes and I would like to migrate from primereact 3 to 6 what is the quickest way to make the necessary corrections?


Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests