React-slick: errors in concurrent mode - > UNSAFE_componentWillMount

Created on 31 Mar 2020  路  23Comments  路  Source: akiran/react-slick

index.js:14426 Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.

  • Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: InnerSlider, Slider

index.js:14426 Warning: 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 memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state

Please update the following components: InnerSlider

Most helpful comment

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

This works but you're not changing anything except removing the error message and all the benefits of the strict mode.
The comp still needs to be updated.

All 23 comments

I am having the same issue...

same here would be good if this gets updated
image

same problem

same issue

@akiran can you please have a look at the issue..?

I have the same issue

Same issue

@akiran facing the same issue. Can you please look into this issue and if any changes, then when are you planning to take it? Thanks

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);
ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

It doesn't solve the problem

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

for me it solved the problem. thanks

https://reactjs.org/docs/strict-mode.html

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

This solved it for me. Thank you

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

This solved it for me. Thank you

interesting ! for me the error is still there

Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.

  • Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: InnerSlider, Slider
index.js:16181 Warning: 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.

@akiran do you think you will fix this issue please?

ReactDOM.render(
  <React.StrictMode> 
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);

to

ReactDOM.render(
    <App />,
  document.getElementById("root")
);

This works but you're not changing anything except removing the error message and all the benefits of the strict mode.
The comp still needs to be updated.

i have problem too anyone can fix it

i have problem too anyone can fix it

delete until they update react-slick with fixes

How could this be most popular library for react and you have to disable strict mode to run it?

Following this. It's not a complete gamebreaking change but would be nice to get rid of this. Looks like we need to swap out the unsafe React methods. @akiran thoughts/how far have we got with this?

@andocodes I am working on it. Hopefully, I will make a release next week with a fix for this

@andocodes @Alekseyideas @mactung @paufar @pejman1 @smorfe @moh3ni
I release [email protected] with a fix for this.

Can you test it now?

@akiran Confirmed from my end! Error is gone. Thankyou!

@akiran just to also confirm - all gone now. Awesome work bud!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artemidas picture artemidas  路  4Comments

ramyatrouny picture ramyatrouny  路  3Comments

nicreichert picture nicreichert  路  3Comments

quarklemotion picture quarklemotion  路  4Comments

BradyEdgar94 picture BradyEdgar94  路  3Comments