bakın son defa uyarıyorum bu bilgiler bana özel. istediğinizi alamaz iseniz genel anlatımı iyi olan insanlardan faydalanın.
İlk önce proje klasöründe yeni bir dosya oluşturuyoruz. FirstComponent diye bişi oluştur içine
1 2 3 4 5 6 7 8 9 10 11 |
import React from 'react'; import { View,Text } from 'react-native'; const FirstComponent = ({name,text}) => { return( <View> <Text>{name}, {text}</Text> </View> ) } export default FirstComponent; |
daha sonra app.js dosyamıza gelip from react native yazan yerin altına
1 |
import FirstComponent from "./FirstComponent"; |
sonra gel abi view içine
1 |
<FirstComponent name={"Cafer"} text={"Hoşgeldin"}/> |