📅  最后修改于: 2022-03-11 15:03:35.282000             🧑  作者: Mango
// 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 ( You clicked {count} times );};
// React Native Styles
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center' }});