더북(TheBook)

이제 WriteScreen 컴포넌트를 생성하고, RootStack에 등록해주세요.

screens/WriteScreen.tsx

import React from 'react';
import {View, StyleSheet} from 'react-native';

function WriteScreen() {
  return <View style={styles.block} />;
}

const styles = StyleSheet.create({
  block: {},
});

export default WriteScreen;

screens/RootStack.tsx

(...)
import WriteScreen from './WriteScreen';

const Stack = createNativeStackNavigator<RootStackParamList>();

function RootStack() {
  useAuthLoadEffect();

  return (
    <Stack.Navigator screenOptions={{headerBackTitle: '닫기'}}>
      (...)
      <Stack.Screen
        name="Write"
        component={WriteScreen}
        options={{title: ' 게시글 작성'}}
      />
    </Stack.Navigator>
  );
}

export default RootStack;
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.