0 votes
in Redux by
What is Pure Functions?

1 Answer

0 votes
by
A pure function always return same output for the same input arguments.

A pure function is a function which

always return the same output for the same input

has no side effects, means it doesn't change any external state.

Example

const add = (a, b) => a + b // A pure function
...