React 4

리액트 함수형 컴포넌트에서 상속해결

https://reactjs.org/docs/composition-vs-inheritance.html Composition vs Inheritance – React A JavaScript library for building user interfaces reactjs.org 컴포넌트 안에 컴포넌트를 넣음으로 해결한다. 컴포넌트 사이에 위치한 컴포넌트는 prop.children 으로 받아와서 부모 컴포넌트에 넘겨준다. const Parent = ({children}) => { // parent props & state // parent methods... return ( {children} ) } const Children = () => { return ( Hello React Native! ) } con..

src 2021.08.09

react native 원형 border radius 만들기

https://stackoverflow.com/questions/30404067/creating-css-circles-in-react-native Creating css circles in react-native I'm having some trouble creating css circles in react-native. The following works in iPhone 6 Plus but in all the other iPhones, they become diamonds. circle: { height: 30, width: 30, stackoverflow.com 리액트 네이티브에서는 borderRadius : '50%' // wrong (x) 테두리 속성에 문자열 %를 줄 수 없다. 그러므로 크기의..

style 2021.08.08