react-infinite-scroll-component icon indicating copy to clipboard operation
react-infinite-scroll-component copied to clipboard

error: UNSAFE_componentWillReceiveProps in strict mode is not recommended

Open hra4h03 opened this issue 5 years ago • 24 comments

I am using react 16.13.1 react-infinite-scroll-component 5.0.5

error: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. 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 memorization techniques or move it to static getDerivedStateFromProps. Learn more at https://fb.me/react-derived-state

Please update the following components: InfiniteScroll

hra4h03 avatar Aug 03 '20 16:08 hra4h03

Hi I'm using same verion and get same error massage.

ramyNiranjan avatar Aug 30 '20 15:08 ramyNiranjan

Also getting this same error.

carlpadilla avatar Sep 02 '20 16:09 carlpadilla

Hi also get this error.

romadryud avatar Sep 05 '20 18:09 romadryud

+1

AsebWebDev avatar Sep 13 '20 14:09 AsebWebDev

I have the same...

Imferal avatar Sep 17 '20 08:09 Imferal

Yeah, I get that too... are you guys using it in a function component as well?

hartman42 avatar Sep 18 '20 01:09 hartman42

Yeah, I get that too... are you guys using it in a function component as well?

Yes exactly. Do you think it matters?

Imferal avatar Sep 18 '20 09:09 Imferal

Go with react-infinite-scroller

Deivaras avatar Sep 23 '20 14:09 Deivaras

i just get this error, how can i fix this?

nostredelica avatar Oct 18 '20 14:10 nostredelica

i just get this error, how can i fix this?

As I said in a message above go with react-infinite-scroller

Deivaras avatar Oct 18 '20 19:10 Deivaras

There's still open PR https://github.com/ankeetmaini/react-infinite-scroll-component/pull/178 which can solve this issue. PR is waiting for you @ankeetmaini .

gynekolog avatar Oct 20 '20 15:10 gynekolog

There's still open PR #178 which can solve this issue. PR is waiting for you @ankeetmaini .

there is a conflicting file in the pull request

WeslleyNasRocha avatar Oct 30 '20 19:10 WeslleyNasRocha

Is this issue fixed? or still open?

pearlpandz avatar Nov 27 '20 13:11 pearlpandz

+1

shweps13 avatar Dec 26 '20 16:12 shweps13

+1

scanifydevo avatar Jan 05 '21 06:01 scanifydevo

New PR #224 without conflicts. Waiting for @ankeetmaini

gynekolog avatar Jan 05 '21 09:01 gynekolog

save problem

{
    "react-infinite-scroll-component": "^6.0.0",
}

hodev-dev avatar Feb 07 '21 01:02 hodev-dev

Does any news related to that? I still face that warning on version 6.0.0 tnx

OriAmir avatar Feb 07 '21 19:02 OriAmir

Same problem here

psteinroe avatar Feb 28 '21 09:02 psteinroe

i hope it get fix because its really good library. but project manager wont let push until error get fixed

hodev-dev avatar Mar 06 '21 07:03 hodev-dev

Same problem

GuiSelair avatar Mar 23 '21 22:03 GuiSelair

Any news, when can we expect this to be resolved?

markoromandic avatar Mar 30 '21 08:03 markoromandic

it work with me :) remove React.StrictMode from index.js replace:

<React.StrictMode>
       <App />
  </React.StrictMode>,
<>
    <App />
  </>,

That is for sure not considerable approach...

Check this for more input: https://reactjs.org/docs/strict-mode.html

markoromandic avatar Apr 06 '21 11:04 markoromandic

Same problem

lynda0214 avatar Apr 16 '21 09:04 lynda0214