Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
React Collapsible triggerSibling property gives invalid element type error

I am working on a SharePoint webpart and need to have a collapsible element that I can add a clickable element to. I have a complex class, so for simplicity's sake, I have created this example webpart that shows the issue. I have tried a number of different things, including things such as creating a component and then setting the triggerSibling property to that, setting it to just a string and adding the content of the const to the triggerSibling property directly. Here is my class.

import * as React from 'react';
import { IHelloWorldProps } from './IHelloWorldProps';
import Collapsible from 'react-collapsible';

export default class HelloWorld extends React.Component<IHelloWorldProps, {}> {
  public render(): React.ReactElement<IHelloWorldProps> {
    const siblingContent = <div><a href="https://www.google.com" target="_blank">Clickable sibling content</a></div>;

    return (
      <Collapsible trigger="Collapsible example" triggerSibling={siblingContent}>
        <p>Some collapsible content</p>
      </Collapsible>
    );
  }
}

I get the following error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Am I doing something wrong? Or is there a better route I should consider for what I need to do?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda