Object serialization is the process of converting an object's state to a string from which it can later be restored.
So, if you are trying to store a inside the Redux state, you need to serialize them before persisting.
Storing functions inside redux state is not a best practice in general. So try to avoid it.
Below are the helper functions for persisting functions inside Redux state.
The function to be stored in the state should be converted into string using serializeFunction.
Convert the string from the redux store into a function using deserializeFunction