Props in getInitialState Is an Anti-Pattern

Link: Props in getInitialState Is an Anti-Pattern

This isn’t really a React-specific tip, as such anti-patterns often occur in code in general; in this case, React simply points them out more clearly.

Good tips on initializing values in constructor. There are difference between initialCount and count.

Makzan
I teach web design. I write books on HTML5 games development. I host classes on mobile web and app development. I made animation with Adobe Flash (now Animate).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.