react-native-simple-gauge | Gauge progress module for React Native
kandi X-RAY | react-native-simple-gauge Summary
kandi X-RAY | react-native-simple-gauge Summary
Gauge progress module for React Native (iOS and Android)
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-simple-gauge
react-native-simple-gauge Key Features
react-native-simple-gauge Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-simple-gauge
QUESTION
I'm developing a React Native app. There, I'm using react-native-simple-gauge
and I want to fill the gauge by calculating the percentage value.
I'm passing the value (value
) and the reference value (refValue
) as props to the particular component. Then, I calculated the percentage as follows.
this.props.value / this.props.refValue * 100
But, this gives me an error saying that
Invariant Violation: Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWilUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
BTW, I'm not using any of setState, componentWillUpdate, componentDidUpdate
in my component.
The relevant code segment is given below.
...ANSWER
Answered 2019-Aug-18 at 06:28With the information you have provided, the only difference is the this.props.refValue
.
If that prop is constantly changing, it will cause the AnimatedGaugeProgress
component to re-render each time.
The easiest way to find the issue is to find out the place where you are changing the value of refValue
. Check in the lifecycle methods, specially ones which can trigger a render.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-simple-gauge
No Installation instructions are available at this moment for react-native-simple-gauge.Refer to component home page for details.
Support
If you have any questions vist the community on GitHub, Stack Overflow.
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page