From 7fae0de263861ec340fda0834385c6cb432b7165 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Mon, 27 Jan 2020 17:36:39 -0800 Subject: [PATCH] Add notice to validateProps --- docs/api-reference.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/api-reference.md b/docs/api-reference.md index e5fcdbbb..47ec56c4 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -560,6 +560,9 @@ Roact.setGlobalConfig({ See [setGlobalConfig](#roactsetglobalconfig) for more details. +!!! note + `validateProps` is a *static* lifecycle method. It does not have access to `self`, and must be a pure function. + !!! warning Depending on the implementation, `validateProps` can impact performance. Recommended practice is to enable prop validation during development and leave it off in production environments.