import React, { Component } from "react";
import {
View,
Image,
ScrollView,
FlatList,
ImageBackground,
Text
} from "react-native";
import Storystyle from "./Storystyle";
// 매우 불편했음
import { StyleSheet } from "react-native";
export default StyleSheet.create({
nav_bar: {
width: "100%",
height: "12%",
borderBottomWidth: 0.8,
borderColor: "#dddddd",
backgroundColor: "#FAFAFA",
justifyContent: "center"
},
nav_icons: {
width: 30,
height: 30,
bottom: 10,
backgroundColor: "#FAFAFA",
position: "absolute"
}
});
<TextInput
placeholder=" 댓글 달기..."
style={{ left: 5, width: "100%" }}
onChangeText={text => {
this.setState({
comment: text
});
}}
value={this.state.comment}
onSubmitEditing={this.handleSubmit}
></TextInput>
// app.js
import { createSwitchNavigator, createAppContainer } from "react-navigation";
export default createAppContainer(
createSwitchNavigator(
{
MainRoute: MainRoute,
Login: Login
},
{
initialRouteName: "Login"
}
)
);
// mainRoute.js
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
const FeedStack = createStackNavigator();
export default function MainRoute() {
return (
<NavigationContainer>
<FeedStack.Navigator>
<FeedStack.Screen name="Bottom" component={Bottom} />
</FeedStack.Navigator>
</NavigationContainer>
);
}
나는 CSS 애니메이션 및 모바일 쿼리를 사용하면서 다양하게 내가 직접 주입하고 싶고 웹에 더 어울리고 행복감을 느껴 리액트 네이티브는 이정도로 마무리하고 나중에 필요한 더 공부를 하겠다