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

165
Visualizações
React Native Pie Chart Showing Error With n.requireNativeComponent

Problem with React Native - react-native-pie-chart

I have been working with javascript, nodejs, and react for a while and decided to try react native. However, when I tried to use a pie chart with either react-native-pie-chart or react-native-pie, I recieved an error (the same one both times). The error I had was:

(0 , n.requireNativeComponent) is not a function
Evaluating @react-native-community/art.js
Evaluating react-native-pie-chart.jse here

This is pretty confusing to me, since the module seems to work for most other people.

The code I had was:

import * as React from 'react';
import { Text, View, StyleSheet, Image } from 'react-native';
import { Card } from 'react-native-paper';
import PieChart from 'react-native-pie-chart';

export default function Stats({ data }) {

const widthAndHeight = 250
const series = [123, 321, 123, 789, 537]
const sliceColor = ['#F44336','#2196F3','#FFEB3B', '#4CAF50', '#FF9800']


return (
    <View style={styles.container}>
        <PieChart
            widthAndHeight={widthAndHeight}
            series={series}
            sliceColor={sliceColor}
            doughnut={true}
            coverRadius={0.45}
            coverFill={'#FFF'}
          />
      
    </View>
)

export default Stats

Help with fixing this would be appreciated. Thanks! :)

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