Vatsal Harde
Vatsal Harde

Reputation: 1548

In My existing Project I have used componentWillMount(). Now its deprecated. So what should i do?

Reajctjs official doc is saying componentWillMount() is deprecated.its unsafe to use. so in my current live project i have used this in many container. is there any chances it willenter image description here break my live system in production?please advise,Thanks.

Upvotes: 0

Views: 38

Answers (1)

Pritish Vaidya
Pritish Vaidya

Reputation: 22209

As mentioned in the docs

This lifecycle was previously named componentWillMount. That name will continue to work until version 17.

You can transform your files before that either manually or by using react-codemod

Upvotes: 1

Related Questions