mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
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.
This commit is contained in:
parent
2209db7b03
commit
e1f89a8352
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user