Giter VIP home page Giter VIP logo

Comments (5)

pritishvaidya avatar pritishvaidya commented on August 28, 2024

Hello @ph98 ,
Can you post the code that you implemented using this package?

Thanks

from react-native-speedometer.

ph98 avatar ph98 commented on August 28, 2024

i also see that there is an error in import statement
image

i used this code ( tried with and without props ) :
`
<RNSpeedometer value={this.state.temp} size={200}

        defaultValue={50}
        minValue={0}
        maxValue={100}
        easeDuration={500}
        labels= {[{
          name: 'Pathetically weak',
          labelColor: '#ff2900',
          activeBarColor: '#ff2900'
        }, {
          name: 'Very weak',
          labelColor: '#ff5400',
          activeBarColor: '#ff5400'
        }]}
        
    />
  </SafeAreaView>`

from react-native-speedometer.

pritishvaidya avatar pritishvaidya commented on August 28, 2024

Here's a working snack expo link with the almost same code, not sure what might be wrong with your code

from react-native-speedometer.

bilalseh avatar bilalseh commented on August 28, 2024

Please run this code:

import { TextInput, View, StyleSheet } from 'react-native';
import RNSpeedometer from 'react-native-speedometer';


export default class App extends React.Component {
  state = {
    value: 100,
  };

  onChange = value => this.setState({ value: parseInt(value) });

  render() {
    return (
      <View style={styles.container}>
        <TextInput placeholder="Speedometer Value" style={styles.textInput} onChangeText={this.onChange} />
        <RNSpeedometer value={this.state.value}
        size={200}
        defaultValue={50}
        minValue={50}
        maxValue={100}
        easeDuration={500}
        labels= {[{
          name: 'Pathetically weak',
          labelColor: '#ff2900',
          activeBarColor: '#ff2900'
        }, {
          name: 'Very weak',
          labelColor: '#ff5400',
          activeBarColor: '#ff5400'
        }]}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  textInput: {
    borderBottomWidth: 0.3,
    borderBottomColor: 'black',
    height: 25,
    fontSize: 16,
    marginVertical: 50,
    marginHorizontal: 20,
  }
});

You will get the same error mentioned above.

from react-native-speedometer.

pritishvaidya avatar pritishvaidya commented on August 28, 2024

from react-native-speedometer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.