강의

멘토링

커뮤니티

Inflearn Community Q&A

travelc2bd33447's profile image
travelc2bd33447

asked

[Renewal] Creating a NodeBird SNS with React

Apply the changed state and check with eslint

ESLint /pages/_app.js 파일의 Component 오류에 대해 궁금합니다.

Written on

·

559

0

const Common = ({ Component }) 이부분에서 받아오는 Component에 'Component' is missing in props validation 이라고 에러가 나옵니다.

proptypes가 잘못된건지 어디가 문제인지 찾지를 못하겠습니다ㅠ

import React from 'react';
import PropTypes from 'prop-types';
import Head from 'next/head';

import 'antd/dist/antd.css';

import wrapper from '../store/configureStore';
// 모든페이지에서 공통인 부분
const Common = ({ Component }) => (
<>
<Head>
<meta charSet="utf-8" />
<title>Nodebird</title>
</Head>
<Component />
</>
);

Common.propType = {
Component: PropTypes.elementType.isRequired,
};

export default wrapper.withRedux(Common);
reduxnodejsexpressreactNext.js

Answer 2

1

zerocho님의 프로필 이미지
zerocho
Instructor

Common.propTypes = { 입니다.

0

travelc2bd3님의 프로필 이미지
travelc2bd3
Questioner

으 오타였군요 ㅠ 감사합니당

travelc2bd33447's profile image
travelc2bd33447

asked

Ask a question