Respond prop types are a method for guaranteeing that the sorts passed to your capacities match those you planned the capacity to take. Prop types hold you back from settling on an unseemly strategy decision, especially when joined with unit testing.
It isn't exceptional to track down a capacity in your code, long in the wake of composing it, and understand that it doesn't exactly match what you want. For instance, assuming a strategy dependably returns a string-based ISO timestamp and you are performing math on numeric UTC timestamps, the outcome is a bothersome vague worth sooner or later your capacity call.
In the engine, React checks the property types passed to a part against those you characterize. The structure logs an admonition to the control center when they don't coordinate.
Top comments (0)