weaveworks / ui-components

A collection of UI components that are shared across Weaveworks projects
http://weaveworks-ui-components.s3-website-us-west-2.amazonaws.com/
Apache License 2.0
30 stars 26 forks source link

componentWillReceiveProps has been renamed, and is not recommended for use #508

Open dholbach opened 4 years ago

dholbach commented 4 years ago
[daniel@reef ui-components ]$ yarn test
yarn run v1.22.5
$ jest
 PASS  src/components/Dialog/Dialog.test.js
 PASS  src/components/Code/Code.test.js
 PASS  src/components/Button/Button.test.js
 PASS  src/components/Input/Input.test.js
 PASS  src/components/Search/Search.test.js
 PASS  src/components/DataTable/DataTable.test.js
  ● Console

    console.warn node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2118
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: DataTable
    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: DataTable

 PASS  src/resolvers/LocalModuleProxy.test.js
 PASS  src/components/index.test.js
 PASS  src/components/TabSelect/TabSelect.test.js
  ● Console

    console.warn node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2118
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: TabSelect
    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: TabSelect

 PASS  src/components/Dropdown/Dropdown.test.js
 PASS  src/components/Alert/Alert.test.js
 PASS  src/components/MatchedText/MatchedText.test.js
  ● Console

    console.warn node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2118
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: MatchedText

 PASS  src/components/Menu/Menu.test.js
 PASS  src/components/Text/Text.test.js

Test Suites: 14 passed, 14 total
Tests:       70 passed, 70 total
Snapshots:   37 passed, 37 total
Time:        3.769s, estimated 4s
Ran all test suites.
Done in 4.43s.
[daniel@reef ui-components ]$