Answers for "react native counter"

0

react native counter

// React Native Counter Example using Hooks!
import React, { useState } from 'react';import { View, Text, Button, StyleSheet } from 'react-native';
const App = () => {  const [count, setCount] = useState(0);
  return (    <View style={styles.container}>      <Text>You clicked {count} times</Text>      <Button        onPress={() => setCount(count + 1)}        title="Click me!"      />    </View>  );};
// React Native Styles
const styles = StyleSheet.create({  container: {    flex: 1,    justifyContent: 'center',    alignItems: 'center'  }});
Posted by: Guest on July-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language