swsnu / swpp2019-team2

COSMOS
0 stars 3 forks source link

Warning on SalesInfo #45

Closed aeri206 closed 5 years ago

aeri206 commented 5 years ago

테스트를 돌려보던 중에 SalesInfo.test.js에서

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

      * Move data fetching code or side effects to componentDidUpdate.
      * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
      * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

      Please update the following components: Calendar, MonthView
    console.warn node_modules/react-dom/cjs/react-dom.development.js:12338
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

      * Move data fetching code or side effects to componentDidUpdate.
      * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
      * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

      Please update the following components: BackgroundCells

위와 같은 내용이 콘솔에 찍히는걸 봤습니다..! 뭔 이름이 바꼈다는 것같은데 warning을 띄우니깐 수정하는 것이 좋을 것 같습니다

das425 commented 5 years ago

react-big-calendar 에서 생겨나는 에러로 판단되어 닫겠습니다 :)