React Redux: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
=Pure Functions= | =Pure Functions= | ||
* | |||
* Like static is c#/c++ only using inputs to produce outputs | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Line 8: | Line 9: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* No side effects | |||
* Also yields same result |
Revision as of 03:57, 23 May 2020
Pure Functions
- Like static is c#/c++ only using inputs to produce outputs
function multiply(a, b)
{
return a * b;
}
- No side effects
- Also yields same result