Skip to main content

Glossary

note

This section is WIP. If you encounter terms throughout the docs you think should be here, feel free to add them or reach out about having them added.

Memoisation

Memoisation means to cache the result of something based on the input. In the context of functions, it means caching the return value based on the arguments received by the function.

For example, if you had a function that calculated the sum of two numbers, to memoise that would be to cache the result so that whenever the function receives the same arguments it pulls the result from the cache rather than rerunning that calculation every time on the same arguments.

Referential equality

When a value is referentially equal it means it has the same reference in memory. In Javascript, non-primitive values are compared by reference, which means that for a value to be evaluated to be equal it needs to have the same reference.

This is often used in the context of React props comparisons, where a non-primitive prop such as an object or array is considered the same between renders if it has maintained the same reference.