styled-component `You may see this warning because you've called styled inside another component.`

컴포넌트 안에서 스타일을 적었기 때문에 발생하는 에러
수정 전 
import styled from 'styled-components'
function PostList() {
  const PostListMenu = styled.div`
    background-color: #EEEEEE;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid #C9C9C9;
    `
  return (
      <PostListMenu> 배달 모집 목록 </PostListMenu>
  )
}수정 후
import styled from 'styled-components'
const PostListMenu = styled.div`
background-color: #EEEEEE;
display: flex;
align-items: center;
justify-content: center;
height: 70px;
font-size: 18px;
font-weight: bold;
border: 1px solid #C9C9C9;
`
function PostList() {
  return (
      <PostListMenu> 배달 모집 목록 </PostListMenu>
  )
}Author And Source
이 문제에 관하여(styled-component `You may see this warning because you've called styled inside another component.`), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@support/styled-component-You-may-see-this-warning-because-youve-called-styled-inside-another-component저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)