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

1.2K
Visualizações
Invariant Violation: View config getter callback for component `div` must be a function (received `undefined`). Make sure to start componen

Currently trying to build a react native screen that displays a chessboard. I am using the react-chessboard component from https://github.com/Clariity/react-chessboard. My code is very basic and I just want to display the screen on an IOS phone using expo. Running this app in a web browser works and the chessboard displays. However, if I want to use a mobile device, I keep getting the error:

Invariant Violation: View config getter callback for component div must be a function (received undefined). Make sure to start component names with a capital letter.

Why is this happening?

import { useRef, useState } from 'react';
import {View, Text, StyleSheet} from 'react-native';
import {Chessboard} from 'react-chessboard';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});

export default function App() {
  return (
    <view>
      <Chessboard/>
    </view>
  );
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

React Native doesn't have divs, it has Views instead. React libraries will usually not translate into React Native libraries because the building blocks are not the same. You will most likely have to find a React Native library for your chessboard or build your own.

about 4 years ago · Juan Pablo Isaza Relatório
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