view
Button
import { StyleSheet, Text, View } from 'react-native';
import { Button } from 'react-native-web';
export default function App() {
return (
<View style={styles.container}>
<View>
<Text>Another piece of text!</Text>
</View>
<Text>Hello World!</Text>
<Button title='Hello' />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Text strings must be rendered within a component
태그만 지워서 돌려보니 잘 돌아가길래..서치해 본 결과, 컴포넌트의 title 속성 값을 컴포넌트로 감싸줘야 문자열이 컴포넌트 내부에서 올바르게 렌더링된다고 한다.