chevcast / react-spinners

Easy loading spinner component and management service for React apps.
MIT License
5 stars 5 forks source link

Update componentWillMount to use setState #2

Open mynameistechno opened 6 years ago

mynameistechno commented 6 years ago

First off, thanks for this module. This is exactly what I need. Second, heads up, React now throws a warning if you set state directly in componentWillMount instead of using setState:

index.js:2214 Warning: SpinnerComponent.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.

image

It also seems like componentWillUpdate will be deprecated altogether in React 17 ...

Cheers!

Simply007 commented 6 years ago

I have fixed the issue in #3