oliviertassinari / react-swipeable-views

A React component for swipeable views. :snowflake:
https://react-swipeable-views.com/
MIT License
4.46k stars 478 forks source link

Getting waring in React 16.8.6 about ComponentWillRecieveProps #534

Open vikas-0 opened 5 years ago

vikas-0 commented 5 years ago

The warinig is as follows:

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

Please update the following components: ReactSwipableView

k-timoshenko commented 5 years ago

According to react 16.9.0 componentWillMount, componentWillReceiveProps and componentWillUpdate were deprecated and will be removed in 17.x version https://alligator.io/react/whats-new-in-react-16.9/

bahtiyara commented 5 years ago

Still receiving the error message. version 0.13.2

Screen Shot 2019-08-24 at 2 42 55 PM
AurelTBE commented 5 years ago

Hi, I also get this issue, here is error message from the console :

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

Please update the following components: ReactSwipableView

mehmetnyarar commented 5 years ago

react-select had this issue lately and they fixed it with this pr. something similar could be done temporarily.

vikas-0 commented 5 years ago

react-select had this issue lately and they fixed it with this pr. something similar could be done temporarily.

It will still be temporary solution

Uttu316 commented 5 years ago

Still facing problem

ValentinMumble commented 4 years ago

Still facing problem

cameronpalatas commented 4 years ago

Receiving the same warning. Any update on a fix?

lofty87 commented 4 years ago

Hi. I received the same warning, too.

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

on the console.

I will wait for your fix. Thank you :)

oliviertassinari commented 4 years ago

I have no interest in investing time in this project anymore. The return is too low compared to the time I can bet on Material-UI. Does anyone want to keep up the development of it? Thanks.

mwskwong commented 4 years ago

@oliviertassinari It will be great if you add a big "Looking For Maintainers" heading in the README.md.

vanvuongngo commented 4 years ago

@oliviertassinari, you mean that material UI could replace this project? And what would be the most important functions to implement or problems to fix? Any possible roadmap for the new maintainers?

oliviertassinari commented 4 years ago

To clarify, I meant that I don't have time to dedicate to this project.

On Material-UI side, we will work on a carousel, but it's unclear if we will actually use this library.

payandeh commented 4 years ago

Receiving the same warning. Any update on a fix?

icastillejogomez commented 4 years ago

Help please!!

dohomi commented 4 years ago

@oliviertassinari is there a repo I could check out for the Material-UI carousel component? Thanks!

oliviertassinari commented 4 years ago

@dohomi The carousel we will build for Material-UI will likely not use this component.

dohomi commented 4 years ago

@oliviertassinari great news that it will land in Material-UI itself. Will it be part of v4 and the material-ui/lab? Thanks for the info!

oliviertassinari commented 4 years ago

@dohomi we will soon start the v5 effort. I think that it will come after.

davidkutas commented 4 years ago

Hey Guys, I see that this wonderful stuff is getting outdated, and maintenance is not provided. I moved to https://github.com/express-labs/pure-react-carousel after trying a lot of jQuery ported solutions such as slick, or other solutions like nuka-carousel. I think this, pure-react-carousel is the best alternative out there at the moment.

nagad814 commented 4 years ago

@oliviertassinari please add Deprecation label or stale label to the Git repo so we may stop using it. Thank you for this wonderful library

caleb-harrelson commented 4 years ago

Workaround implemented in #616, release coming soon.

daveteu commented 4 years ago

Do we have confirmation from the owner that this will continued to be maintained? We are intending to use this for production and this seems like the best and most suitable we have tested yet.

sakstone commented 3 years ago

Hi Guys,

it looks like it is still a open issue? Are there any plans to fix it?

[Error] Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/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://reactjs.org/link/derived-state

Please update the following components: ReactSwipableView
agnel commented 2 years ago

Hi Guys,

it looks like it is still a open issue? Are there any plans to fix it?

[Error] Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/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://reactjs.org/link/derived-state

Please update the following components: ReactSwipableView

I'm too getting this Warning in dev console.

korbav commented 2 years ago

Hi Guys, it looks like it is still a open issue? Are there any plans to fix it?

[Error] Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/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://reactjs.org/link/derived-state

Please update the following components: ReactSwipableView

I'm too getting this Warning in dev console.

A fix is ready in PR but, if my understanding is right, it won't be merged, the author advises using the MUI lib instead.

https://github.com/oliviertassinari/react-swipeable-views/pull/654

agnel commented 2 years ago

@korbav Why does the author advise using MUI ? Is there a similar component in MUI ?

korbav commented 2 years ago

@korbav Why does the author advise using MUI ? Is there a similar component in MUI ?

To be honest, I'm not sure, I'm not really getting it. To my knowledge, there's nothing similar.

k-timoshenko commented 2 years ago

@korbav Why does the author advise using MUI ? Is there a similar component in MUI ?

Because he is "CEO, co-founder at https://github.com/mui"

agnel commented 2 years ago

@korbav Why does the author advise using MUI ? Is there a similar component in MUI ?

Because he is "CEO, co-founder at https://github.com/mui"

@t-kanstantsin Okay, this answers the "Why?".

Could you help me out with the "How?". ? Or provide any guidance or hint on it?

k-timoshenko commented 2 years ago

@agnel Sorry I don't have solution or replacement. I just pointed why there is no chance to receive support in this repository.

flying-sheep commented 2 years ago

the author advises using the MUI lib instead.

I doubt it, since the author explicitly refers from mui’s docs and issue tracker to react-swipeable-views instead: mui/material-ui#507

mschwartz commented 1 year ago

2022-10-07 at 1 45 PM

sermunar commented 1 year ago

omg he made a carousel out of it, guys, we are in a loop. please help!

christiaanwesterbeek commented 1 year ago

I am probably gonna receive some thumbs down for this, but I got annoyed by the error just enough to implement the following wrapper for console.error to silence this particular message.

const consoleError = console.error;

console.error = function filterErrors(msg, ...args) {
    if (/UNSAFE_componentWillReceiveProps/.test(msg) && args[0] === 'ReactSwipableView') {
        return;
    }
    consoleError(msg, ...args);
};
sneko commented 1 year ago

@Grsmto took the time to publish a fix in a forked package (thank you!). It works on my side (I didn't want to search for an alternative). I keep using the original name to benefit from typings...

Just use:

mparisi76 commented 9 months ago

@Grsmto took the time to publish a fix in a forked package (thank you!). It works on my side (I didn't want to search for an alternative). I keep using the original name to benefit from typings...

Just use:

  • npm install react-swipeable-views@npm:@gromy/react-swipeable-views
  • yarn add react-swipeable-views@npm:@gromy/react-swipeable-views
  • pnpm add react-swipeable-views@npm:@gromy/react-swipeable-views
  • or install @gromy/react-swipeable-views directly

fyi does not work with React 18..