0.0.3 • Published 4 years ago

rn-use-interval v0.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

rn-use-interval

Installation

npm i rn-use-interval --save

How to use

const App = ()  => {
  const [time, setTime] = React.useState(0);
  useInterval(() => setTime(time+1), 1000);

  return (
      <>
        <SafeAreaView style={styles.container}>
          <Text>{time}</Text>
        </SafeAreaView>
      </>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  }
});
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago