Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!