Skip to content

Commit

Permalink
Update wording on pure function definition.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
askreet authored Mar 27, 2022
1 parent 2209db7 commit 9b09ecc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9b09ecc

Please sign in to comment.