그러고 나서 meta 태그를 설정하고 싶은 곳에 Helmet 컴포넌트를 사용하면 됩니다. App 컴포넌트를 다음과 같이 수정해 보세요.
App.js
import React from 'react'; import { Route } from 'react-router-dom'; import PostListPage from './pages/PostListPage'; import LoginPage from './pages/LoginPage'; import RegisterPage from './pages/RegisterPage'; import WritePage from './pages/WritePage'; import PostPage from './pages/PostPage'; import { Helmet } from 'react-helmet-async'; const App = () => { return ( <> <Helmet> <title>REACTERS</title> </Helmet> <Route component={PostListPage} path={['/@:username', '/']} exact /> <Route component={LoginPage} path="/login" /> <Route component={RegisterPage} path="/register" /> <Route component={WritePage} path="/write" /> <Route component={PostPage} path="/@:username/:postId" /> </> ); }; export default App;