From e1f89a8352be8f8ec9cf982feacd69a52f6ce69d Mon Sep 17 00:00:00 2001 From: Kyle Smith Date: Sun, 27 Mar 2022 15:29:33 -0400 Subject: [PATCH] Update wording on pure function definition. (#2556) I was originally going to put a PR to fix "has not side-effects", but I also re-read this sentence and realized it could be interpreted as saying a pure function returns its parameters, not a deterministic value based on its parameters. --- website/docs/concepts/function-components/pure-components.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/concepts/function-components/pure-components.mdx b/website/docs/concepts/function-components/pure-components.mdx index 8977a00853e..a3fa8249025 100644 --- a/website/docs/concepts/function-components/pure-components.mdx +++ b/website/docs/concepts/function-components/pure-components.mdx @@ -4,7 +4,7 @@ title: "Pure Components" ## Pure function definition -A function is considered pure when the return values are always identical to passed down parameters. And it has not side-effects. +A function is considered pure when the return values are deterministic given the same parameters, and it has no side-effects. ## Pure components