예를 들어 여러 화면에서 같은 component를 많이 재사용하고 있다고 가정한다. 그러면 어떤 화면에서는 boolean 값을 넘겨주는 것으로 component의 스타일을 각자 다르게 보이고 하고 싶다.
어떻게 해야 할까. //MainScreen.js ...
... //Copyright.js 라는 component import React from 'react'; import {StyleSheet, Text} from 'react-native'; import PropTypes from 'prop-types'; import {COPYRIGHT} from 'assets/color/Palette'; const Copyright = ({text, isUnderLine}) => { return {text}
#
component
#
components
#
create
#
props
#
props전달
#
reactnative
#
stylesheet
#
styles에
#
전달